# Does addChild work with masks?

**URL:** <https://forum.kirupa.com/t/does-addchild-work-with-masks/246248>\
**Category:** flash\
**Created:** [December 8, 2007, 10:29pm UTC](https://forum.kirupa.com/t/does-addchild-work-with-masks/246248 "2007-12-08T22:29:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iblokh](https://avatars.discourse-cdn.com/v4/letter/i/8baadc/32.png) [@iblokh](https://forum.kirupa.com/u/iblokh)\
**Post date:** [December 8, 2007, 10:29pm UTC](https://forum.kirupa.com/t/does-addchild-work-with-masks/246248/1 "2007-12-08T22:29:17Z")

</div>

Perhaps I’m missing something about masking or the display list, but here’s my problem:

I have a clip with an animation, a mask and a static image I load under the mask. If I place the image there myself, everything looks fine. I am trying to use add/remove child to dynamically change which image is displayed under the mask.

So in the layered that is masked, I have a blank MC named “container”, into which I am trying to load an image. Just using one for test purposes like so:

bulb.container.addChild(new iconShot());

If I make the mask layer invisible, then everything shows up. If I use the mask layer, then the clip underneath it never shows up. Any ideas why?

---

<div class="post-metadata">

**Author:** ![Gar\_Fonz](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@Gar\_Fonz](https://forum.kirupa.com/u/Gar_Fonz)\
**Post date:** [July 15, 2008, 7:08am UTC](https://forum.kirupa.com/t/does-addchild-work-with-masks/246248/2 "2008-07-15T07:08:44Z")

</div>

Just found out that if you must mask the main movieClip/Sprite plus its children, it you want the contents to show up.
