all groups > macromedia flash sitedesign > june 2007 >
You're in the

macromedia flash sitedesign

group:

Create a delay function in Flash 8?


Create a delay function in Flash 8? nguoirucro
6/25/2007 12:00:00 AM
macromedia flash sitedesign:
Hi all,

I try to create a separate delay function, so that I can execute sequentially:

functionA();
delay();
functionB();

I previously user timer so I had to integrate function B into the delay
function, which is very inconvenient.
Could anyone please help me to create a separate function as above?

Many thanks.
Re: Create a delay function in Flash 8? David Stiller
6/25/2007 12:00:00 AM
nguoirucro,

[quoted text, click to view]

This is a popular one. ;)

[quoted text, click to view]

For better or worse, though, that's the way to do it.

[quoted text, click to view]

ActionScript doesn't support something like a global delay() or sleep()
function. In ActionScript 2.0 (or AS1) you can use setInterval() or
setTimeout() to delay as many functions as you please. In ActionScript
3.0 -- for which you'd need Flash CS3 -- you can use the Timer class.


David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."

Re: Create a delay function in Flash 8? nguoirucro
6/26/2007 12:00:00 AM
I see. So sad :(

AddThis Social Bookmark Button