# Run after addChild and it's visible

**URL:** https://forum.kirupa.com/t/run-after-addchild-and-its-visible/252273
**Category:** flash
**Created:** [February 18, 2008, 4:32pm UTC](https://forum.kirupa.com/t/run-after-addchild-and-its-visible/252273 "2008-02-18T16:32:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![contrast](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@contrast](https://forum.kirupa.com/u/contrast)
#### Post date: [February 18, 2008, 4:32pm UTC](https://forum.kirupa.com/t/run-after-addchild-and-its-visible/252273/1 "2008-02-18T16:32:24Z")

</div>

I want to run a function after a movieclip is added to the display list (using addChild) and becomes visible. I have tried the event ADDED, but that fires right away, before the movieclip is visible. If I use the event ADDED\_TO\_STAGE it never fires for some reason. Does anyone else do this sort of thing?

If you want more details please read on…

I have read the following posts:

> **[Wait for one class to finish before running another](https://www.kirupa.com/forum/showthread.php?t=284164)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

  
and  

> **[ActionScript 3 Tip of the Day - Page 6](https://www.kirupa.com/forum/showthread.php?p=1899603)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

but it just seems like the post was suggesting to use events, which tpann and I are. It doesn’t seem to say why the ADDED\_TO\_STAGE event would not work. Am I missing something?

The function that I call hogs the CPU for several seconds, so I want to be able to have the movieclip visible before that happens, the movieclip is a static “Loading” screen. This way the user knows the game hasn’t frozen on them.

Thanks for any help.
