PDA

View Full Version : Swiss Army Slideshow -- stop loop?



jgold723
06-08-2007, 01:15 PM
1) Script Title: Swiss Army Image Slideshow

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

3) Describe problem: I'd like to modify the script in order to keep my show from repeating. I'm using a slideshow as my splash page (instead of flash) and I'd like it to cycle once, and then stop at the last slide.

How can I do that?

Thanks,

John

turkey1605
06-08-2007, 07:01 PM
Assuming you have all of your images in an array, you can run through them using an increasing 'index' variable. The variable can just be incremented on each cycle until it reaches a certain value, then it will no longer increase-causing the slideshow to end.

jgold723
06-11-2007, 03:56 PM
I tried doing that, but it didn't work. But it's probably because I don't know much (if anything) about javascript. Here's what I used:

var i=0
for (i=0;i<=0;i++)
{
contents of slideshow script here
}

My assumption was that the show would cycle once, change i to 1 and then it would stop. But it just seems to either ignore this completely, or it never starts the show at all.

Can you suggest what I should be using?

Thanks,

John

jscheuer1
06-11-2007, 04:40 PM
See:

http://www.dynamicdrive.com/forums/showthread.php?t=18370

jgold723
06-15-2007, 03:44 PM
Thank you! That was just what I was looking for.

John