# AS3.0\>\>\> removeChild

**URL:** <https://forum.kirupa.com/t/as3-0-removechild/170059>\
**Category:** flash\
**Created:** [November 22, 2005, 1:48pm UTC](https://forum.kirupa.com/t/as3-0-removechild/170059 "2005-11-22T13:48:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JimmyH](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jimmyh/32/1884_2.png) [@JimmyH](https://forum.kirupa.com/u/JimmyH)\
**Post date:** [November 22, 2005, 1:48pm UTC](https://forum.kirupa.com/t/as3-0-removechild/170059/1 "2005-11-22T13:48:45Z")

</div>

I’m assuming some of you’s must be doin some AS3.0 so i’ll post it here to see if anyone knows the answer.

i have an array of MovieClips that i’m checking in an enterFrame event to see if the scaleX has hit one… if it has remove the child from the display list. I keep getting an

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

now… what i’m doing is adding a child on every frame (a mc)… pushing it into an array and then checking the whole array to see if nay have hit their target scaleX’s as below

```auto
for (var i:int = this.ball_array.length - 1; i >= 0; i--)
{
	if (this.ball_array*.scaleX >= 1)
	{
		this.removeChild(this.ball_array*);	
	}
}

```

there’s obviously somit worng with the way i’m doing this. Does anyone have any ideas?

Cheers

Jimmy
