[RESOLVED] Hi, newbie question about concat
Hello.
I was a great flash programmer in Flash 4.0 :) But things have changed and I'm not back to the newbie category.
So I'm wondering if I can concatinate variable names so I can make a loop creating several variables for example.
So here's how I make a new instance of a movieclip by linkage.
var ball1:MovieClip = new Ball();
addChild(ball1);
ball1.x = 300;
ball1.y = 250;
Can I somehow do like this:
var i:int=1;
var ["ball"i]:MovieClip = new Ball();
addChild(["ball"+i]);
["ball"+i].x = 300;
["ball"+i].y = 250;
Where I can put that in a loop and make 10 clips at once, same code just increase the variable i.
Obiously the syntax is wrong but is there a way?