Variable with variable name

Hi I’m wondering how do u call a variable that has a variable name.

max = 10;

For (i=1; i<=max; i++)
this.attachMovie(“expBall”, “ball”+i, i);


Now I want
ball1._x = 100i;
ball2._x = 100

until ball10._x=100*i;

how can i do that? how do i address a variable name which is variable?

[AS]max = 10;

for (i=1; i<=max; i++)
var duplicate = this.attachMovie(“expBall”, “ball”+i, i);
duplicate._x = 100*i;
};[/AS]is the best way, but if you want to access your clips afterwards, you’d have to something like this[“ball”+5]._x = …

pom :slight_smile:

Yeah that array access operator thingy was just what I was looking for… thanks :slight_smile: