# Can the child remove itself?

**URL:** <https://forum.kirupa.com/t/can-the-child-remove-itself/318089>\
**Category:** flash\
**Created:** [January 10, 2011, 1:07pm UTC](https://forum.kirupa.com/t/can-the-child-remove-itself/318089 "2011-01-10T13:07:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![newsteve](https://avatars.discourse-cdn.com/v4/letter/n/5f8ce5/32.png) [@newsteve](https://forum.kirupa.com/u/newsteve)\
**Post date:** [January 10, 2011, 1:07pm UTC](https://forum.kirupa.com/t/can-the-child-remove-itself/318089/1 "2011-01-10T13:07:36Z")

</div>

Main.swf creates a new instance of the SuperMan Class.  
I’m trying to get the SuperMan class to remove itself when you push a button that the class creates. I’m using:

removeChild(this);

However I am getting the error:

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.

Is this even possible? How can I do it?
