# Access movie clip properties inside a for loop

**URL:** https://forum.kirupa.com/t/access-movie-clip-properties-inside-a-for-loop/247007
**Category:** Uncategorized
**Created:** [December 17, 2007, 5:57pm UTC](https://forum.kirupa.com/t/access-movie-clip-properties-inside-a-for-loop/247007 "2007-12-17T17:57:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jhoekw57](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@jhoekw57](https://forum.kirupa.com/u/jhoekw57)
#### Post date: [December 17, 2007, 5:57pm UTC](https://forum.kirupa.com/t/access-movie-clip-properties-inside-a-for-loop/247007/1 "2007-12-17T17:57:34Z")

</div>

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~
