public static function clearContainer(cont:DisplayObjectContainer):void { while(cont.numChildren > 0) { cont.removeChildAt(0); } }