DisplayObjectContainer的getChildAt()方法
当一个容器内有多个显示对象,要获取这些子显示对象用:
var len:int = waterLayer.numChildren;
for(var i:int=0; i <len;i++)
{
var crtItem:DisplayObject = waterLayer.getChildAt(i);
}
例二
var i:int;
for(i = 0; i < this.numChildren; i++)
{
var child:DisplayObject = this.getChildAt(i);
if(child is BigLetter)
{
this.removeChild(child);
i--;
}
}