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

09-19-2009, 05:55 PM
1) Script Title: Ultimate Fade-in slideshow (v2.0)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.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:

<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_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: ""


09-19-2009, 08:37 PM
displaymode: {type:'auto', pause:3500, cycles:1, wraparound:true}

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

09-20-2009, 03:54 AM
I tried that and it still does the same thing.

09-20-2009, 05:07 AM
I figured it out myself. In the .js file there is a line like this:

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:

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

09-20-2009, 08:30 AM
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.

11-23-2009, 12:18 PM
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!