PDA

View Full Version : Restarting after a few seconds



Diplomat
January 19th, 2004, 08:16 PM
Can someone please give me some code I can add after at stop(); function to restart the movie (or play from frame1 on scene1) after 3 seconds? Thank you.

GreenLantern
January 19th, 2004, 09:29 PM
is your stop() function on a movie clip?

kode
January 20th, 2004, 03:10 AM
Use the setInterval() function; look it up in the ActionScript Dictionary, and run a search in the forum. ;)

GreenLantern
January 20th, 2004, 04:43 AM
Nobody uses the old getTimer() anymore. It's starting to get lonely.

norie
January 20th, 2004, 04:47 AM
that's b/c setInterval is funner :P

Diplomat
January 20th, 2004, 09:52 AM
It is not on a movie clip.

reweb
January 20th, 2004, 10:08 AM
Actions in frame 1


time = 3000


Actions in frame X


function playBegin() {
clearInterval(hold);
gotoAndPlay("Scene 1", 1);
}
hold = setInterval(playBegin, time);
stop();

REEFˇ
January 20th, 2004, 05:28 PM
I knew it was something with setInterval and a function, forgot about clearInterval though :).

Diplomat
January 20th, 2004, 06:05 PM
Yea now it all works. Thanks

reweb
January 20th, 2004, 09:47 PM
I use a funcion that helps the forum and I home I post an AS 4 diplomat. I hopte it helped him. :-D

New Bie stuff I posted in the forum.
I am a newbie too.

Diplomat
January 21st, 2004, 08:33 AM
Thanks a lot, you DID help me.