PDA

View Full Version : replaying a MC every 40 seconds...


ibanez270dx
10-16-2007, 06:54 AM
Hi everyone,
I rarely use Flash, so any help is appreciated... I simply need a movieclip to play every 40 seconds. In my case, its a simple MC that is 20 frames long. I just need it to run and stop at frame 20, then replay after 40 seconds, continuously.

Thanks,
- Jeff

Scott Euser
10-16-2007, 05:11 PM
This should do the trick!
You can read up on setInterval in the flash helpfuls- important to make sure you clear it or you will crash your flash doc when calling the function from itself :)

function waitthis() {
your_mc.play();
clearInterval(wait);
wait = setInterval(waitthis, 40000);
}
waitthis();