Removing only certain children from MC

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.


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