Results 1 to 2 of 2

Thread: Blending Image Slideshow Script Delay in the Loop

  1. #1
    Join Date
    Aug 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Blending Image Slideshow Script Delay in the Loop

    1) Script Title: Blending Image Slideshow Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/image4.htm

    3) I was wondering, is there any way to put a delay between the fading?

    Meaning, I want it to fade through all the images once, then allow for a delay before it plays all over again instead of a continuous loop. Is that possible?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,982
    Thanks
    43
    Thanked 3,197 Times in 3,159 Posts
    Blog Entries
    12

    Default

    Find this code at the end of the second script block:

    Code:
    function slideit(){
    if (!document.images) return
    if (ie) document.images.slide.filters[0].apply()
    document.images.slide.src=imageholder[whichimage].src
    if (ie) document.images.slide.filters[0].play()
    whichlink=whichimage
    whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
    setTimeout("slideit()",slidespeed+blenddelay)
    }
    slideit()
    Make it like so (additions/changes highlighted):

    Code:
    function slideit(){
    if (!document.images) return
    if (ie) document.images.slide.filters[0].apply()
    document.images.slide.src=imageholder[whichimage].src
    if (ie) document.images.slide.filters[0].play()
    whichlink=whichimage
    slideit.added_delay = whichimage < slideimages.length - 1? 0 : 3000;
    whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
    setTimeout(slideit, slidespeed + blenddelay + slideit.added_delay);
    }
    slideit()
    See the red 3000? That will add 3 seconds to the delay when transitioning from the last image to the first (3000 milliseconds = 3 seconds). Adjust as desired.
    - John
    ________________________

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

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
  •