View Full Version : Random start to sequential slideshow

12-15-2010, 10:28 PM
Script Title: Ultimate Fade-in slideshow (v2.4)


First of all, this is a fantastic script. It's very close to what I need, but I'm looking for a slight adaptation. I've seen it discussed in this post, but it references v1.51, so the script has changed too much for this to work (I believe): http://www.dynamicdrive.com/forums/archive/index.php/t-38352.html

That's exactly what I'm looking for, though...a sequential slideshow that has a random beginning. So one time onload it might randomly choose slide3 as the first slide, then proceed to 5, 6, 7 through the end and start the sequence over. The next time the page is opened/refreshed, it might randomly choose slide 6 as the first slide, then proceed to slide 7, 8, 9 through the end and start the sequence over at 1, 2, etc.

Any help you could give would be much appreciated! :) Thanks!

12-16-2010, 12:55 AM
Actually v2.4 has such a feature built in already. :) Just set the "randomize" option within the "displaymode" setting to true:

displaymode: {type:'auto|manual', pause:milliseconds, cycles:0|integer, wraparound:true|false, randomize:true|false},

12-20-2010, 04:44 PM
Thanks for your help. While that seemed to work at first, the slideshow doesn't always progress sequentially once the first image is randomly chosen. I've set it up at http://www.alpacabreeders.org/ with the ads/images at the top left of the content area. There are only 3 now, but will be 7 soon. Please forgive the pixilation...the client is sending better quality ads shortly :).

Anyway, my main concern is not so much having a random start to a sequential slideshow, but having a random slideshow that displays all of the available images before starting over again. For example, if it randomly chooses slide 2 to start with, I would like it to display slides 1, 3, 4, 5, 6 and 7 (in any order) before showing slide 2 again. It may be that a more complex script is needed, in which case, no worries. The script you have is a great one for photo slideshows, and I'm sure I'll use it again in other situations. Thanks again for your speedy reply and for a great script.

12-21-2010, 12:50 AM
Hmm I'm a little confused. The way the random feature of this script works is that it scrambles the order of the slides before showing them. It will still display all the available images within the slideshow before starting over again. For example, given the slides 1,2,3,4,5, with the random feature on, when the page loads, that order may now become 2,3,1,5,4. There are no duplication of any slides.

12-22-2010, 05:00 PM
I see what you're saying. That's working great. Thanks for explaining it.