Search code examples
actionscriptvisible

ActionScript - Need item to stay 5sec before disappearing


Hello I'm new to AS :( I want to make a pic stay visible for about 5seconds before it disappears. Can anyone please help?

The picture is at the start before a loop begins. Thx in advance..I got only this command so far if it's needed or not.... visible = false;

I know there are several ways to do this but I was hoping for your advice. Thanks


Solution

  • is this AS3 right?

    I would do addChild() too add it,

    then as zamnuts wrote, do a setTimeout for 5 seconds and when the 5 secs are over do a removeChild, and continue with the rest