Here I am giving you a little code through which you can remove all children's but it will removes children's in an opposite order it will removes them from the top same as we keep items at the top of the stack instead of the bottom which may be slightly quicker if you have a lot of child objects that need to be removed.
Code:
var children:Array = new Array();
trace ('before : '+holder.numChildren);
while(holder.numChildren)
{
holder.removeChildAt(0);
}
var i:int = holder.numChildren;
while( i -- )
{
holder.removeChildAt( i );
}
trace ('after : '+holder.numChildren);
trace ('after : '+holder.numChildren);
trace ('-------------------------');
Bookmarks