Jul 24
This is pretty easy, but also pretty usefull.
It removes all the children of a given object. You can use with Flex or Flash.
/**************************************/
Muito fácil, mas também muito útil.
Remove todos os filhos de um dado objeto. Você pode usar com Flex ou Flash.
/**************************************/
[code lang="actionscript"] package com.util {
import flash.display.DisplayObjectContainer;public class RemoveChildren {
public static function removeAll(owner:DisplayObjectContainer):void{
var j:int=owner.numChildren;
while (j - -){
owner.removeChildAt(j);
}
}
}
}[/code]




September 24th, 2008 at 6:31 am
Bom dia… porque não usar o owner.removeAllChildren?
gostava de falar mais consigo
September 24th, 2008 at 8:22 am
Sim, também pode ser :0)
October 2nd, 2008 at 4:33 pm
Ah, sabia que tinha um bom motivo para ser assim: não tem removeAllChildren no flash…
:0)
March 7th, 2009 at 9:26 am
Obrigado, você salvou uma vida.