# Remove Child

**URL:** <https://forum.kirupa.com/t/remove-child/304212>\
**Category:** flash\
**Created:** [February 3, 2010, 2:15pm UTC](https://forum.kirupa.com/t/remove-child/304212 "2010-02-03T14:15:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ricky55](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Ricky55](https://forum.kirupa.com/u/Ricky55)\
**Post date:** [February 3, 2010, 2:15pm UTC](https://forum.kirupa.com/t/remove-child/304212/1 "2010-02-03T14:15:18Z")

</div>

Hi

Someone the other day provided me with this code to a remove a child from the main timeline from within a movieclip.

parent.removeChild(MovieClip(parent).mc1);

This works fine, but how can I write an if statement to test if its in the display list before removing it?

As I’m getting an error if I try to remove it once its already been removed.

Thanks in advance
