Results 1 to 5 of 5

Thread: Help with Fade in Image Slideshow

  1. #1
    Join Date
    Apr 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with Fade in Image Slideshow

    Script: Fade-in Slideshow
    URL: http://www.dynamicdrive.com/dynamici...nslideshow.htm

    Could anyone show me how to make this slideshow not loop. I would like it to stop after going through the photos only once and ending at the same photo where it started. Thanks.

  2. #2
    Join Date
    Apr 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    can someone please help? I have to put this up on my website in memory of John Paul II

  3. #3
    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

    Sure, find these two lines in the code:
    Code:
    tempobj.innerHTML='<img src="'+fadeimages[nextimageindex]+'">'
    nextimageindex=(nextimageindex<fadeimages.length-1)? nextimageindex+1 : 0
    Make them look like this:
    Code:
    tempobj.innerHTML='<img src="'+fadeimages[nextimageindex]+'">'
    if ((nextimageindex==1)&&(a==1))
    return;
    if (nextimageindex==0)
    a=1;
    nextimageindex=(nextimageindex<fadeimages.length-1)? nextimageindex+1 : 0
    and at the top add to this:
    Code:
    var slideshow_width='140px' //SET IMAGE WIDTH
    var slideshow_height='225px' //SET IMAGE HEIGHT
    var pause=3000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
    like this:
    Code:
    var slideshow_width='140px' //SET IMAGE WIDTH
    var slideshow_height='225px' //SET IMAGE HEIGHT
    var pause=3000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
    var a

  4. #4
    Join Date
    Apr 2005
    Location
    santa cruz, ca
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face Fade-In slideshow; stopping loop

    I, too, am attempting to stop the cross fade after it has transitioned from image "0" to image "1". (In my case, a photo of a light fixture fading from off to on.)
    I followed the posted directions, and now the first image ("0")loads, but there is just an image placeholder where the second ("1") should be. This is an awesome script, but I cannot use it unless my rabbit brain can somehow figure out the snag in my script.
    Forgive me, but I do not have an active link this page I'm working on; I've simply created a test page that has it's images in same directory.
    Please advise!
    Thank you,
    Eleanor
    Here is what I've done:

    var slideshow_width='288x' //SET IMAGE WIDTH
    var slideshow_height='191px' //SET IMAGE HEIGHT
    var pause=3000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
    var a
    var fadeimages=new Array()
    //SET 1) IMAGE PATHS, 2) optional link, 3), optional link target:
    fadeimages[0]=["ceilpendconeoff.jpg", "", ""] //plain image syntax
    fadeimages[1]=["ceilpendconeon.jpg", "", ""] //image with link syntax

    AND THEN...

    tempobj.innerHTML='<img src="'+fadeimages[nextimageindex]+'">'
    if ((nextimageindex==1)&&(a==1))
    return;
    if (nextimageindex==0)
    a=1;
    nextimageindex=(nextimageindex<fadeimages.length-1)? nextimageindex+1 : 0

  5. #5
    Join Date
    Apr 2005
    Location
    santa cruz, ca
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking I did it!

    After actually looking at the code, I simply changed the last digit in the code to "1" rather than "0", to represent the "on" light fixture.
    Thank you, if anyone read my post, and I hope this helps someone else in the future.
    -eleanor

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
  •