So, I've got this block of code that is working fine right now:
function displayBox(boxX,boxY,i):vo
id{
var box:mcAvatar = new mcAvatar();
box.x = boxX;
box.y = boxY;
addChild(box);
}
However what I'd like to do is make multiple boxes by adding the value of 1 to the box variable name.
var box + i:mcAvatar = new mcAvatar();
doesn't work. Any suggestions on how to accomplish this?
Start Free Trial