# \[FMX2004\]Variables and File Paths

**URL:** <https://forum.kirupa.com/t/fmx2004-variables-and-file-paths/65973>\
**Category:** flash\
**Created:** [October 1, 2004, 3:24am UTC](https://forum.kirupa.com/t/fmx2004-variables-and-file-paths/65973 "2004-10-01T03:24:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![A7RSTR7K3](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@A7RSTR7K3](https://forum.kirupa.com/u/A7RSTR7K3)\
**Post date:** [October 1, 2004, 3:24am UTC](https://forum.kirupa.com/t/fmx2004-variables-and-file-paths/65973/1 "2004-10-01T03:24:16Z")

</div>

Ok guys well here it is. I am trying to make some way of addressing a movieclip but I want it to be able to change. Well here is the situation. I have a for loop which is creating a new movieclip instances until it is equal to or less than my arrays length. Well it makes all these and it names them test0 test1 test2 test3… and so on. Now I am trying to write a loop that address all of them, the only problelm is I dont know how to use a variable to address them, or some work around to do so. Sorry if this is confusing tell me if you find this to be confusing.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 1, 2004, 9:56am UTC](https://forum.kirupa.com/t/fmx2004-variables-and-file-paths/65973/2 "2004-10-01T09:56:36Z")

</div>

Welcome to kirupaforum=)

Can you post your code/.fla?

scotty(-:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 1, 2004, 10:12am UTC](https://forum.kirupa.com/t/fmx2004-variables-and-file-paths/65973/3 "2004-10-01T10:12:44Z")

</div>

Letz say you have 3 boxes in \_root.  
You can adress them like this

```auto

var1 = "box";
for (i=1;i<=3;i++){
_root[var+i]._alpha = 50;
//or
_root["box"+i]._x = 50+_root["box"+i]._width*i
}

```

And soo on. If this doesn’t help… post some code 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 1, 2004, 12:56pm UTC](https://forum.kirupa.com/t/fmx2004-variables-and-file-paths/65973/4 "2004-10-01T12:56:25Z")

</div>

Thnx virusescu that is what I was looking for… however i found it just before I came to check back here. Thanks anyways… that is the code I needed thanks a ton. I knew there had to be some way of doing it I just couldnt find it. Thnx again
