# Removing child problem

**URL:** https://forum.kirupa.com/t/removing-child-problem/330871
**Category:** flash
**Created:** [March 31, 2013, 6:18pm UTC](https://forum.kirupa.com/t/removing-child-problem/330871 "2013-03-31T18:18:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Mr\_Flopsie](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@Mr\_Flopsie](https://forum.kirupa.com/u/Mr_Flopsie)
#### Post date: [March 31, 2013, 6:18pm UTC](https://forum.kirupa.com/t/removing-child-problem/330871/1 "2013-03-31T18:18:30Z")

</div>

I have a bunch of objects in a movieclip.  
Why am I not allowed to do the following?

```auto
rubyCont.getChildAt(i).Destroy();

```

Destroy() is a function of the child in rubyCont. The child is mc\_Ruby.  
Obvious if I do mc\_Ruby.Destroy(); all the instances get destroyed.  
I don’t see why I can’t do this? I’d like to remove the objects with that function so that the eventlisteners also get removed…

Can someone give me a quick explanation/solution?  
Thanks!

~Mr Flopsie
