0
votes

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

2

2 Answers

1
votes

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 );
}        
1
votes

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