# Child movieclips in for loops

**URL:** <https://forum.kirupa.com/t/child-movieclips-in-for-loops/233357>\
**Category:** flash\
**Created:** [July 23, 2007, 12:28pm UTC](https://forum.kirupa.com/t/child-movieclips-in-for-loops/233357 "2007-07-23T12:28:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hatu](https://avatars.discourse-cdn.com/v4/letter/h/f04885/32.png) [@hatu](https://forum.kirupa.com/u/hatu)\
**Post date:** [July 23, 2007, 12:28pm UTC](https://forum.kirupa.com/t/child-movieclips-in-for-loops/233357/1 "2007-07-23T12:28:02Z")

</div>

I want to attach 4 child clips to one master clip and then control them in a for loop but I can’t get the mc variable to work right.  
It traces the right name but AS doesn’t seem to like it and won’t change the \_x

for(i=0;i\<4;i++){  
master.attachMovie(“noob”, “noob”+i,i, {\_y:100});  
}

for (j=0;j\<4;j++){[COLOR=Red]  
mc=[‘master.noob’+j];  
mc.\_x = 100+(5\*j);[/COLOR]  
}
