Copy link to clipboard
Copied
There is a moviclip under instance name of 'stadium', inside it I have 4 'log' moviclips - 'log0', 'log1',...'log3';
The thing is, that I don't know how to have access with each of them withing just one loop. Like, if I had 1000 logs inside, it's stupid to write code by hand for each of them.
My Code:
for (var i:uint =0; i<4; i++)
{
var x:int = stadium.this["log" + i].x;
...
}
so of course, this gives me an error, because the way it's written is incorrect.
What is a solution for that? Thanks...
use:
for (var i:uint =0; i<4; i++)
{
var xvar:int = stadium["log" + i].x;
...
}
Copy link to clipboard
Copied
use:
for (var i:uint =0; i<4; i++)
{
var xvar:int = stadium["log" + i].x;
...
}
Copy link to clipboard
Copied
Thanks kglad for quick response
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now