# Dynamic path problem

**URL:** <https://forum.kirupa.com/t/dynamic-path-problem/52641>\
**Category:** Uncategorized\
**Created:** [May 26, 2004, 12:51am UTC](https://forum.kirupa.com/t/dynamic-path-problem/52641 "2004-05-26T00:51:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tedc](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tedc](https://forum.kirupa.com/u/tedc)\
**Post date:** [May 26, 2004, 12:51am UTC](https://forum.kirupa.com/t/dynamic-path-problem/52641/1 "2004-05-26T00:51:16Z")

</div>

Hey again :-/ Im tying to target a path that is dynamic, haha that doesnt sound like it makes sense…

well I am trying to load a movie, I have several of them that are all on one frame (on different layers) and I have something like this:

[AS]  
Width = \_root.Content.Content1.\_width + 164;  
Height = \_root.Content.Content1.\_height;  
X = \_root.Content.Content1.\_x + 164;  
Y = \_root.Content.Content1.\_y;  
this.createEmptyMovieClip(“box”,2);  
box.lineStyle(1,0,1);  
box.beginFill(0xFFFFFF,100);  
box.moveTo(X,Y)  
box.lineTo(X,Height);  
box.lineTo(Width,Height);  
[/AS]

…etc etc…

BUT the problem is that the target for the Width, Height, X, and Y variables is not always Content.Content1… it actually depends on which button you press, so it might be Content.Content2 or 3 or 4 or 5, I think this is probably pretty simple but Im not sure of the syntax. The variable for the number is \_root.picture

I tried \_root.Content.Content + \_root.picture + .\_width for example, but it doesnt work. Also if I use quotes then it turns everything into a string instead of the value of the \_width. Am I making sense?

Appreciate all the help …

Ted
