Hello all. I need a liitle help with tageting a child. I’m attaching an array of boxes from the library to the stage with a ticker interval. I want each box to do something (like go to frame 2) each time the ticker fires. How do I implement this?
Thanks.
Here is the code:
var i:int;
var ID:int;
var titleList:int;
titleList=11;
var tickerIndex=0;
var tickerInterval:uint;
records = new Array();
var box:MovieClip;
for (i=0; i < titleList; i++) {
box = new redBox ();
box.x=i*100;
box.y=150;
box.ID=i;
box.name=“box_”+i;
records.push(box.ID);
}
tickerInterval=setInterval(updateTicker,2000);
updateTicker();
function updateTicker():void {
var headline:String=records[tickerIndex];
a.text=headline;
///box.id do something
if (++tickerIndex==titleList) {
tickerIndex=0;
}
}