전공/실무

[as3.0] getChildAt, getChildByName

하루는노력 2012. 12. 6. 20:03
728x90
반응형






var i:Number;
var num:Number = numChildren;
var aArray:Array = new Array;

function getChildNum(){    
     for( i=0; i<num; i++ ){
          if( getChildAt(i).name.substring(0,1) == "a" ){
               aArray.push(getChildAt(i).name);
          }
     }
}

function getChildName(){
     for( i=0; i<aArray.length; i++ ){
          trace(aArray[i]);
     }
}

getChildNum();
getChildA();

반응형
LIST