Question
Referencing one of a series of child clips
Here's an example of a series of MovieClips being loaded into
a container clip:
for(var i:int=0;i<10;i++){
var dotClip:Dot = new Dot();
dotClip.y = i*dotClip.height + 5;
holder1.addChild(dotClip);
}
In attempting to affect one particular loaded clip, I've got this:
var dots:Array = new Array();
for(var i:int=0;i<10;i++){
var dotClip:Dot = new Dot();
dotClip.y = i*dotClip.height + 5;
holder1.addChild(dotClip);
dots.push(dotClip);
}
dots[5].x = -25;
My question is, is there a way to refer to that sixth dot without having to create an array and push all the dots into it? I'm trying to migrate from the AS2 attachMovie() . Many thanks!
for(var i:int=0;i<10;i++){
var dotClip:Dot = new Dot();
dotClip.y = i*dotClip.height + 5;
holder1.addChild(dotClip);
}
In attempting to affect one particular loaded clip, I've got this:
var dots:Array = new Array();
for(var i:int=0;i<10;i++){
var dotClip:Dot = new Dot();
dotClip.y = i*dotClip.height + 5;
holder1.addChild(dotClip);
dots.push(dotClip);
}
dots[5].x = -25;
My question is, is there a way to refer to that sixth dot without having to create an array and push all the dots into it? I'm trying to migrate from the AS2 attachMovie() . Many thanks!