PDA

View Full Version : Loop through 200 frames.



zbphill
02-08-2010, 02:06 PM
I have a 3rd party swf(that I can't edit) that produces a 360 degree product shot. I'm new to javascript so need direction. I'm trying to make a button that when you mouse over it keeps moving to next frame until it gets to 200 then starts over at 0 and starts again.

Right now if you mouse over it goes to frame 1.
I'm assuming I would need to make a loop that runs to 200?



<INPUT TYPE="button" VALUE="Go To Cover Page" onMouseOver="S7Config.setFlashParam('_frameButton1','currentFrame', frame)">

<script type="text/javascript">
frame = 1;
</script>

Thanks for the help
Zach

zbphill
02-10-2010, 04:03 PM
maybe I can make it easier. I need a loop and I need a mouse over to continuously run through the loop.

So on mouse over it writes "Frame 1" then replaces "Frame 1" with "Frame 2" and so on.


<script type="text/javascript">
var i=0;
for (i=0;i<=200;i++)
{
document.write("frame " + i);
document.write("<br />");
}
</script>

Thanks again.