# removeChild partially working?

**URL:** <https://forum.kirupa.com/t/removechild-partially-working/323616>\
**Category:** flash\
**Created:** [July 9, 2011, 7:22pm UTC](https://forum.kirupa.com/t/removechild-partially-working/323616 "2011-07-09T19:22:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scheisse](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@Scheisse](https://forum.kirupa.com/u/Scheisse)\
**Post date:** [July 9, 2011, 7:22pm UTC](https://forum.kirupa.com/t/removechild-partially-working/323616/1 "2011-07-09T19:22:33Z")

</div>

I am trying to remove an enemy after I kill them and I just started working with code in .as files. The enemy has it’s own logic in a .as file and when I use removeChild, the movieclip is removed, but the logic continues to attack the main character (invisible).

Is there a better way of removing the enemy character permanently. It kind of scares me that the method I use could just be leaving invisible movieclips on the screen as well.

I’ve tried everything that I have used in previous games:  
removeChild(EnemyArray\*);

And this, which causes other problems with my code but removes the logic:  
EnemyArray\* = null;  
But these still cause the problem.

Can anyone help!? Thanks in advanced if you can!
