Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / General Flash Topics / July 2008



Tip: Looking for answers? Try searching our database.

sleep()-like function in flash

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
polatkanfatih - 05 Jul 2008 15:48 GMT
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....
David Stiller - 06 Jul 2008 00:57 GMT
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."
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.