Hey Gang, I’m trying to make some dynamic movie clips, with a drawn rectangle inside a for loop. But I can’t figure out if an MC can be named like an Array. How close is this?
function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
var guideBox:Array;
for (var i:int = 1; i < 10; i++)
{
var nextXPos = i*(boxWidth+boxMargin);
guideBox* = new MovieClip();
guideBox*.graphics.beginFill(0xff1111);
guideBox*.graphics.drawRect(nextXPos, 0, boxWidth, boxHeight+boxMargin);
guideBox*.addEventListener(MouseEvent.CLICK, doButton);
addChild(guideBox*);
}