for each(var child

isplayObject in this.getChildren())
{
比如child的类型为PANEL,请问如何获取child的类型?
我用child.className来访问,为何提示没有定义className呢?
}
后来我采用如下解决,但不知道为什么要这样才能解决呢?
for each(var child:Object in this.getChildren()){
if(child.className == "Panel"){
this.removeChild(child as DisplayObject);
}
}