Click to See Complete Forum and Search --> : slideshow "stop" command
ilpimp
12-17-2003, 09:35 AM
i have taken the code for this slideshow (http://javascript.internet.com/miscellaneous/fading-slide-show.html) and altered it a little, but is there anyway that i can get it to stop after one cycle, or after a certain amount of time?
Pittimann
12-17-2003, 09:48 AM
Hi!
One simple example to stop the slideshow after one cycle (other options are possible too).
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j <= (p - 1)) t = setTimeout('runSlideShow()', slideShowSpeed);
}
Just change the runSlideShow function like above; the rest remains untouched...
Cheers - Pit
ilpimp
12-17-2003, 09:56 AM
thanx dude. it worked great
Pittimann
12-17-2003, 10:05 AM
Hi!
You're welcome! Hope, this option does it for you. Adding some more code (for which I don't have time right now:() it would easily be possible to specify a number of cycles to be gone through as well...
Cheers - Pit