Results 1 to 3 of 3

Thread: Ultimate slideshow - Run Once onLoad, Click to Run Again

  1. #1
    Join Date
    Sep 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Ultimate slideshow - Run Once onLoad, Click to Run Again

    1) Script Title: Ultimate slideshow - Run Once onLoad, Click to Run Again

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm

    3) Describe problem: Hi there, Snax the noob here. I have incorporated the Ultimate fade-in slideshow to the banner on my website (sweet script btw), and used jscheuer1's modification (http://www.dynamicdrive.com/forums/s...ead.php?t=9148) to cycle through the image slideshow only when the banner is clicked.

    I am now trying to have the slideshow run once onLoad of the page or when it is refreshed, then run again if clicked as already achieved thx to jscheuer1.

    I have done my best searching the Forums and had a go at modifying the code (changing 0's to 1's and vice versa) but got nowhere. As you can tell, I have very little Javascript knowledge, but can usually find thet solution I am looking for with a quick Google search.

    I appreciate your time and look forward to some constructive responses.

    Cheers,
    Snax

    PS - I ran into problems pasting my code here b/c went over the alotted images limit. The only modifications I did to jscheuer1's code was with the array declaration(s) for the banner images.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I remember that one, it was a tough one to work out but, easy to get it to do what you want, find the this.flag value here:

    Code:
    function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay){
    var tempimage=theimages[0]
    for (var i_tem = 0; i_tem < theimages.length-1; i_tem++)
    theimages[i_tem]=theimages[i_tem+1]
    theimages[theimages.length-1]=tempimage
    this.flag=1
    this.mouseclickcheck=0
    this.delay=delay
    this.degree=10 //initial opacity degree (10%)
    this.curimageindex=theimages.length-1
    this.nextimageindex=0
    Change it to 0.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Perfect thanks John, that worked a treat. I tried that but it stalled on the second image so I figured it wasn't the solution. Works now so sweet as.

    Thanks again.

    Snax

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
  •