# Problem targeting child

**URL:** <https://forum.kirupa.com/t/problem-targeting-child/321387>\
**Category:** Uncategorized\
**Created:** [April 18, 2011, 8:38pm UTC](https://forum.kirupa.com/t/problem-targeting-child/321387 "2011-04-18T20:38:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronmac](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@ronmac](https://forum.kirupa.com/u/ronmac)\
**Post date:** [April 18, 2011, 8:38pm UTC](https://forum.kirupa.com/t/problem-targeting-child/321387/1 "2011-04-18T20:38:40Z")

</div>

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;  
}  
}
