I’m running into a roadblock with creating multiple instances of a movie clip. I’m trying to display a series of boxes across the bottom of the stage. The number of boxes are determined by _global.maxStep[_global.sectionNum]. I have a movie clip called StepBox that will serve as the template for each box. In the StepBox movie clip is a dynamic text box called stepNumText, which I want to set to the value of the counter. The problem I have is that I’ve only ever used attachMovie, but there is no movie for it to attach to. I tried using Content since that’s the name of the layer this is in, but I know that doesn’t make sense (and it doesn’t work).
[FONT=Courier New]
_global.updateBoxes = function() {
var curr_box;
for (i = 1; i <= _global.maxStep[_global.sectionNum]; i++) {
curr_box = Content.attachMovie("StepBox", "StepBox"+i+"_mc", i);
curr_box._x = 30 + 20*i;
curr_box._y = 375;
curr_box.stepNumText.text = String(i);
}
};
[/FONT]
Any help for this newbie would be greatly appreciated!
Thanks!
Mathminded