# Removing only certain children from MC

**URL:** https://forum.kirupa.com/t/removing-only-certain-children-from-mc/316802
**Category:** flash
**Created:** [December 2, 2010, 6:21pm UTC](https://forum.kirupa.com/t/removing-only-certain-children-from-mc/316802 "2010-12-02T18:21:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![m2244](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@m2244](https://forum.kirupa.com/u/m2244)
#### Post date: [December 2, 2010, 6:21pm UTC](https://forum.kirupa.com/t/removing-only-certain-children-from-mc/316802/1 "2010-12-02T18:21:25Z")

</div>

Hello,

I have a movieclip in which I want to remove all of the children that are of type textfield, leaving anything else. As anyone familiar with this?

This is what I have so far but it throws an error.

```auto

if(String(this.mcContentOnStage.getChildAt(i).type) == "[object TextField]")
   {
    "This must be a textfield!"
    //this.mcContentOnStage.getChildAt(i).text
   }

```
