PDA

View Full Version : looping animation


themonkey
09-16-2002, 08:11 PM
i have an animation that basically scrolls an object across the screen in a certain amount of time.

it now needs to loop as soon as the animation finishes,

can anyone shed some light or examples/code/demo of how to add the loop so it only loops once the animation has finished.

thanks in advance

themonkey

zoobie
09-16-2002, 09:01 PM
Those scripts are kinda big but they work.

Anyway, you can find the answer here (http://www.hotscripts.com/search/?query=animation&category=JavaScript). :D

joh6nn
09-17-2002, 05:24 AM
it's always easier to offer a good answer when we have code to look at. can we see the page this is on?

themonkey
09-17-2002, 05:02 PM
thanks for pointing me in the right direction.

but its the looping part thats giving me trouble.

the animation (various) differnt ones. move from one point to another. from off screen to off another part of the screen. but then i need the script to start from scratch so the images look like they are continuosly scrolling across the screen.

so this is the order

run animation.
set timeout for specific time.
then loop the whole animation.

how is this written in javascript?

thanks