# Using different paths to movieclip

**URL:** <https://forum.kirupa.com/t/using-different-paths-to-movieclip/268280>\
**Category:** flash\
**Created:** [August 12, 2008, 5:44am UTC](https://forum.kirupa.com/t/using-different-paths-to-movieclip/268280 "2008-08-12T05:44:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![four4swords](https://avatars.discourse-cdn.com/v4/letter/f/87869e/32.png) [@four4swords](https://forum.kirupa.com/u/four4swords)\
**Post date:** [August 12, 2008, 5:44am UTC](https://forum.kirupa.com/t/using-different-paths-to-movieclip/268280/1 "2008-08-12T05:44:19Z")

</div>

hi,

I want to have a script that goes something along like this… I have a moveclip on the stage. and in it… i have a variable “variable1 = true”.

the movieclip would be named “clip1”…

if it were on the maintimeline…I would reference it like this…

```php

trace(_root.clip1.variable1)

```

and it would work… and it’ll trace me true…

however… what i want to do is… because the “clip1” won’t always be on the maintimeline… maybe if it were in another movieclip called “clip1234”…

i wanted to create something like this.

```php
path = "_root.clip1234";
trace([path].clip1.variable1)

```

so… like this… i can easily just change the “path” variable and it’ll always know where to look for the variable…

however… this way doesn’t work…

So… I’m asking if there is a way i could make this work…

Thanks!
