Question

I'm new on Flash, i don't know if it possible, but i'm adding a random movieclip to the stage, using addChild, and i need to remove them after 10 seconds...how can i do this using removeChild?

regards

Was it helpful?

Solution

Or you can use the default function from flash library

setTimeOut()

More Info.

And at the end it would be looking like this:

setTimeOut ( removeClip, 2000, clip );

function removeClip ( clip : DisplayObject ) : void
{
    removeChild ( clip );
}        

OTHER TIPS

Use the Timer class. Also the TweenLite library has a nice function called TweenLite.delayedCall(secondsDelay, functionToCall)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top