Access movie clip properties inside a for loop

hey all,

i’m sort of a newbie to the whole as3 migration and having difficulty with a few things that seemed easier in as2… specifically accessing a movieclips properties inside a for loop.

essentially, i have 40 unique movie clips on the stage with unique instance names word0 - word39. I’m trying to run a for loop to get the x and y coords of each movie clip and spit those coords into an array. but every way i’ve tried to get * worked into the code throws an error of the words being undefined… here’s the code I’m trying:

var coords:String = new String();
for (i:Number = 0; i<40; i++){
coords = word*.x + “,” word*.y + “,”;
};

tracing coords should get me a string of 40 x and y coordinates separated by commas, right?

the error i get is 1120: Access of undefined property word… I’m sure it’s probably a simple syntax issue, but I’m not finding it.

Thanks~