Results 1 to 6 of 6

Thread: Ultimate Fade-in slideshow (v2.0) - stop on last image?

  1. #1
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ultimate Fade-in slideshow (v2.0) - stop on last image?

    1) Script Title: Ultimate Fade-in slideshow (v2.0)

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

    3) Describe problem: The script works fine for the most part, but I have the cycles set to 1 and instead of stopping on the last image, it loops around and stops on the 1st image. Is there a way to fix this?

    Here is my code:
    Code:
    <script type="text/javascript">
    
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    	dimensions: [519, 481], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["images/home_slide_1.jpg"],
    		["images/home_slide_2.jpg"],
    		["images/home_slide_3.jpg"],
    		["images/home_slide_4.jpg"],
    		["images/home_slide_5.jpg"]		 //<--no trailing comma after very last image element!
    	],
    	displaymode: {type:'auto', pause:3500, cycles:1, wraparound:false},
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 750, //transition duration (milliseconds)
    	descreveal: "ondemand",
    	togglerid: ""
    })
    
    </script>

  2. #2
    Join Date
    Sep 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    displaymode: {type:'auto', pause:3500, cycles:1, wraparound:true}

    you see: wraparound set to "true" instead of "false"

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

    Default

    I tried that and it still does the same thing.

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

    Default

    I figured it out myself. In the .js file there is a line like this:

    Code:
    var imgindex=(keyword=="next")? (setting.curimage<totalimages-1? setting.curimage+1 : 0)
    I changed the 0 to the # of the last image, -1...since I have 5 images, I changed it to 4:

    Code:
    var imgindex=(keyword=="next")? (setting.curimage<totalimages-1? setting.curimage+1 : 4)

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Right now the script defines 1 cycle as 1 complete cycle (start and end at the same image). If you still need help on changing that behavior, let us know.
    DD Admin

  6. #6
    Join Date
    Nov 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have the same need. I would like the script could be stopped in last image.

    Anyway I have used the workaround proposed by Greyhound and works fine. Thanks!

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
  •