# addChild does not add sprite to front?

**URL:** <https://forum.kirupa.com/t/addchild-does-not-add-sprite-to-front/314553>\
**Category:** flash\
**Created:** [October 1, 2010, 4:21pm UTC](https://forum.kirupa.com/t/addchild-does-not-add-sprite-to-front/314553 "2010-10-01T16:21:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ersk](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@Ersk](https://forum.kirupa.com/u/Ersk)\
**Post date:** [October 1, 2010, 4:21pm UTC](https://forum.kirupa.com/t/addchild-does-not-add-sprite-to-front/314553/1 "2010-10-01T16:21:57Z")

</div>

Simply put, I am adding a sprite to the stage on the event of a button being pressed. The problem is that it hides behind my other sprite that is attached to the stage on runtime.

I have also tried messing around with addChildAt() but with no success.

The other sprite that is attached on runtime is added to the stage through a class. Could the sprite within the class be disrupting the layering/z order?

Don’t know too much about flash and havn’t used it for a while so any help would be great.
