This content has been marked as final.
Show 1 reply
-
1. Re: sleep()-like function in flash
Newsgroup_User Jul 5, 2008 4:57 PM (in response to polatkanfatih)polatkanfatih,
> i need a sleep-like function. for example for(i=0;i<10;i++), I
> want "i" to increase after a time interval, i.e. i need a functio
> n which will make function wait....
There is no sleep() equivalent in ActionScript, so you're not likely to
find a solution for a for() loop. You do, however, have setInterval() and
setTimeout() in ActionScript 1.0/2.0 and the Timer class in ActionScript
3.0. All of the above have the capability of executing a specified
function/method after a specified perioud of time, in milliseconds.
David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."

