Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Apr 2011
    Location
    Republic of Immigrants
    Posts
    53

    Default Auto-Switching Pictures on Site...

    Slow in the head as I am sure there is a post somewhere but I am looking for the best practice and/or code for switching pictures every handful of seconds for a given page.

    Thanks for the insight in advance.

  2. #2

    Default Re: Auto-Switching Pictures on Site...

    Mike
    Last edited by mwenz; 05 May 2011 at 07:56 PM. Reason: removed the post.

  3. #3
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,518

    Default Re: Auto-Switching Pictures on Site...

    Yes, Mike, a Xara example would be of benefit seeing as this is a Xara Web Designer and not a WebPlus forum

    Thanks

  4. #4

    Default Re: Auto-Switching Pictures on Site...

    Geez, I replied and it vanished.

    Gary, the point was the javascript. But hey, you knew that <g>.

    At least I warned everyone what it was done in.

    Take care, Mike

  5. #5
    Join Date
    Apr 2011
    Location
    Republic of Immigrants
    Posts
    53

    Default Re: Auto-Switching Pictures on Site...

    Confused...was there some code supposed to be posted? thanks in advance.

  6. #6

    Default Re: Auto-Switching Pictures on Site...

    There was both code and an example posted. The example was originally done for another web site creation application that I explained. Gary's post sort of ticked me off and so I removed the link. A childish response, I suppose.

    But I think your other thread:
    http://www.talkgraphics.com/showthre...ht=#post401120

    Was a duplicate request for help and was answered satisfactorily, correct?

    Take care, Mike

  7. #7
    Join Date
    Apr 2011
    Location
    Republic of Immigrants
    Posts
    53

    Default Re: Auto-Switching Pictures on Site...

    Actually was looking for two different things. The random picture code worked like a champ. Love it. I was looking a follow-up to have a random picture (rocking and rolling now with previous post) and when a picture shows up, it switches to the next one. So basically whomever sees all the pictures. Not looking to have a million pictures, maybe just 5 or 6. If I could get them to switch every 5 to 7-seconds or so that would be great.

    Appreciate the response.

  8. #8

    Default Re: Auto-Switching Pictures on Site...

    I'll work up an Xara sample--but probably tomorrow as I am pretty swamped today.

    Take care, Mike

  9. #9
    Join Date
    Apr 2011
    Location
    Republic of Immigrants
    Posts
    53

    Default Re: Auto-Switching Pictures on Site...

    Thanks a bunch Mike.

  10. #10
    Join Date
    Apr 2011
    Location
    Republic of Immigrants
    Posts
    53

    Default Re: Auto-Switching Pictures on Site...

    Here is the code I used. Found it on another site. Have to do some clean-up to remove the URL's, etc. but it worked...

    <script language="JavaScript1.1">
    <!--
    /*
    JavaScript Image slideshow:
    By Website Abstraction (www.wsabstract.com)
    and Java-scripts.net (www.java-scripts.net)
    */

    var slideimages=new Array()
    var slidelinks=new Array()

    function slideshowimages(){
    for (i=0;i<slideshowimages.arguments.length;i++){
    slideimages[i]=new Image()
    slideimages[i].src=slideshowimages.arguments[i]
    }
    }

    function slideshowlinks(){
    for (i=0;i<slideshowlinks.arguments.length;i++)
    slidelinks[i]=slideshowlinks.arguments[i]
    }

    function gotoshow(){
    if (!window.winslide||winslide.closed)
    winslide=window.open(slidelinks[whichlink])
    else
    winslide.location=slidelinks[whichlink]
    winslide.focus()
    }
    //-->
    </script>

    <a href="javascript:gotoshow()"><img src="/index_test_htm_files/usa1.gif" name="slide" border=0></a>

    <script>
    <!--
    //configure the paths of the images, plus corresponding target links
    slideshowimages("/index_test_htm_files/usa2.gif", "/index_test_htm_files/usa3.gif", "/index_test_htm_files/usa4.gif")
    slideshowlinks("http://wsabstract.com", "http://dynamicdrive.com", "http://java-scripts.net")

    //configure the speed of the slideshow, in miliseconds
    var slideshowspeed=8000
    var whichlink=0
    var whichimage=0

    function slideit(){
    if (!document.images)
    return
    document.images.slide.src=slideimages[whichimage].src
    whichlink=whichimage

    if (whichimage<slideimages.length-1)
    whichimage++
    else
    whichimage=0
    setTimeout("slideit()",slideshowspeed)
    }
    slideit()
    //-->
    </script>

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •