all groups > flash actionscript > april 2006 >
You're in the

flash actionscript

group:

setInterval or getTimer() ?


setInterval or getTimer() ? lostinscript
4/5/2006 9:55:43 PM
flash actionscript:
Hi,

In a game im trying to make, Im trying to get a movie clip to appear on stage
at certain times, say..every 10 seconds, move off the stage, either left or
right (according to a different mc's position on stage).

I've been playing with both the setInterval and getTimer with no luck...im
getting pretty frustrated with this as i know its something simple. Ive
searched for tutorials on it but can only find ones that show how to make
clocks and such using getTimer()....

Anyone got any suggestions as to where im going wrong, what would be the
correct way to do this?

Cheers....anyhooow.
Re: setInterval or getTimer() ? kglad
4/5/2006 10:57:47 PM
for something that only needs to be accurate within 1 second, setInterval() is
more than adequate. you could use one setInterval() to attach your movieclip
every 10 seconds and another to loop through code that would move the movieclip
off-stage.
Re: setInterval or getTimer() ? lostinscript
4/6/2006 6:31:11 AM
Hi kglad,

Thanks for the advice and for replying....

I will try some script tonight and see how it goes..

Re: setInterval or getTimer() ? kglad
4/6/2006 4:05:50 PM
AddThis Social Bookmark Button