# Need assistence with "dynamic" pathing

**URL:** <https://forum.kirupa.com/t/need-assistence-with-dynamic-pathing/279936>\
**Category:** flash\
**Created:** [January 20, 2009, 8:12pm UTC](https://forum.kirupa.com/t/need-assistence-with-dynamic-pathing/279936 "2009-01-20T20:12:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SevenGales](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@SevenGales](https://forum.kirupa.com/u/SevenGales)\
**Post date:** [January 20, 2009, 8:12pm UTC](https://forum.kirupa.com/t/need-assistence-with-dynamic-pathing/279936/1 "2009-01-20T20:12:24Z")

</div>

Need assistence with “dynamic” pathing  
(Okay my english isn’t that good, and certainly not when it concerns computer terms, so forgive me if my title was misleading)

I encountered a problem in my flash file.  
What I want to do is, use a For-Loop to set the size for up to 10 different Movie clips at the same time? How Do I do this?

This piece of code used to work for me:

for (i=0; i \< (\_root.bars+1); i++) {  
setProperty("/bar"+i, \_width, 16.6);  
}

Where the movie clips were named: bar1 bar2 bar3…bar10  
But I made some adjustments, the movie clips are now no longer directly on stage, but rather inside another movie clip with the isntance name of “mm”

note: \_root.bars refers to a variable called bars which I made in the first frame of the swf file to contain numbers for me (When it is made, I gave it the value of 3), a frame where the movieclip called mm isn’t on stage yet. At first it worked, but maybe this causes the error now that I made some adjustments.

I tried:

for (i=0; i \< (\_root.bars+1); i++) {  
setProperty(\_root.mm.bar+i, \_width, 16.6);  
}

But it doesn’t work. I’m not a AS genius, I use it in my freetime and I have only recently started using it, so I don’t know alot.

Can anyone please help me with this isue?
