# Removing children from the stage

**URL:** <https://forum.kirupa.com/t/removing-children-from-the-stage/285822>\
**Category:** flash\
**Created:** [April 7, 2009, 12:08am UTC](https://forum.kirupa.com/t/removing-children-from-the-stage/285822 "2009-04-07T00:08:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![baggins825](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@baggins825](https://forum.kirupa.com/u/baggins825)\
**Post date:** [April 7, 2009, 12:08am UTC](https://forum.kirupa.com/t/removing-children-from-the-stage/285822/1 "2009-04-07T00:08:22Z")

</div>

Hi all, im making a game and it has enemies randomly spawning at the top of the screen going down to the bottom, so far it all works fine, except for when i try to remove the enemies I get this error

```auto

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
	at flash.display::DisplayObjectContainer/removeChild()
	at spaceavoider/deleteenemy()[/Users/bobbymoranville/Desktop/space avoider/spaceavoiderclasses/spaceavoider.as:135]
	at enemythree/garbagecollect()[/Users/bobbymoranville/Desktop/space avoider/spaceavoiderclasses/enemyone.as:43]
	at enemythree/updatemove()[/Users/bobbymoranville/Desktop/space avoider/spaceavoiderclasses/enemyone.as:37]

```

I have tried every route to fixing this that i can think of but none so far has worked, any suggestions would be greatly apprieciated. :top\_hat:  
P.S. There are fourteen separate classes for the enemies, but they are all similar to the one i attached.
