JS Help...
- Started
- Last post
- 6 Responses
- IRNlun60
YYYEEESSSS!!!! I F'ING GOT IT!!!
Thanks for putting me on the right track cosmo. all I was missing was;
counter = 0;
if (counter >= 9)
{
.....blah, blah, blah...
counter++
setTimeout ("slideschange('" + change + "')", imagedelay);
}
}I was missing counter++....
thanks for the help cosmo & heavyt. I love this place. Always coming through in the clutch...
YYYESSS!!!!
- heavyt0
it is very close now.
only difference is that you need to run a counter. so, each time the function runs, it needs to increment a number (i), and check that it's value is less than 9.
- IRNlun60
:(
- IRNlun60
*bump
would anyone have any resources that might help me out with this? Thanks.
- IRNlun60
thanks for the help cosmo but no luck...
I'm probably way off here but I'm guessing because it can't recognize how many times it's cycled through the array (there are 3 images). Just knows to current image +1 then once it hits the 3rd image go back to zero. Man I'm lost here.
thanks again cosmo. Let me know if you have any other ideas...
- cosmo0
you put a check for if current image counter is less than 9 or not. Let me know if it worked.
currentimage = 0;
if (currentimage < 9)
{
f (document.images) {
document.images[chan ge].src = slides[currentimage] .src;
currentlink = currentimage;
if (currentimage < slides.length-1)
currentimage = currentimage + 1;
else
currentimage = 0;
setTimeout ("slideschange('" + change + "')", imagedelay);
}
}
- IRNlun6
Hi all,
I trying to modify a simple JS rotating image to stop after 9 rotations...sounds simple enough but I'm not too comfortable with JS so please help me out someone... here's the script (variables not included; *hopes this works)function slideschange(change) {
if (document.images) {
document.images[change].src = slides[currentimage].src;
currentlink = currentimage;
if (currentimage < slides.length-1)
currentimage = currentimage + 1;
else
currentimage = 0;
setTimeout ("slideschange('" + change + "')", imagedelay);
}
}