# AS Paths and stuff (MX)

**URL:** https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520
**Category:** flash
**Created:** [November 22, 2002, 5:34pm UTC](https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520 "2002-11-22T17:34:29Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Raydred](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/raydred/32/65_2.png) [@Raydred](https://forum.kirupa.com/u/Raydred)
#### Post date: [November 22, 2002, 5:34pm UTC](https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520/1 "2002-11-22T17:34:29Z")

</div>

Ok im having troubles with my paths to things.

I am using relative path, im trying to set a variable from one MC to another…

Heres how i have it structured…

MainMC –  
|  
----- MC1  
|  
----- MC2

Now i want to set a variable from MC1 to MC2

But for whatever reason its not working.

And yes i have the instance named, and its on the same layer…

hmm… any ideas?

---

<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: [November 22, 2002, 6:42pm UTC](https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520/2 "2002-11-22T18:42:28Z")

</div>

wow either, i Make no sense, or i post some pretty advanced stuff that no one knows of lol =)

I think i make no sense lol.

---

<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: [November 22, 2002, 6:54pm UTC](https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520/3 "2002-11-22T18:54:35Z")

</div>

Did u try this:

```php
_parent.MC2.h88 = 12

```

---

<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: [November 22, 2002, 7:04pm UTC](https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520/4 "2002-11-22T19:04:27Z")

</div>

When u test the movie, and list the variables, the output would be:

> Level #0:  
> Variable \_level0.$version = “WIN 6,0,21,0”  
> Movie Clip: Target=“\_level0.MC1”  
> Movie Clip: Target=“\_level0.MC2”  
> Variable \_level0.MC2.h88 = 12

Notice that h88 variable had been succesfully declared and set to 12. And offcourse it was set in MC1 by the code above.

yours,  
h88

---

<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: [November 22, 2002, 7:43pm UTC](https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520/5 "2002-11-22T19:43:35Z")

</div>

ok, a little further…

Now this is a movie that will be loaded in…

now \_root is the Main movie, and not the movie loaded in.

does \_parent. Refers to the movie loaded in the main movie?

---

<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: [November 22, 2002, 8:14pm UTC](https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520/6 "2002-11-22T20:14:04Z")

</div>

\_parent Property specifies or returns a reference to the movie clip or object that contains the current movie clip or object. The current object is the object containing the ActionScript code that references \_parent. Use \_parent to specify a relative path to movie clips or objects that are above the current movie clip or object.

---

<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: [November 22, 2002, 8:44pm UTC](https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520/7 "2002-11-22T20:44:58Z")

</div>

ok…

I understand that a little better now…

Ok, now what if you want to access or set information from a movie clip above that one (in the hierarchy structure.)

ex:

\_root.thisMc.insideMc  
thats the one i want to give info to… (in a variable)

and its comming from

\_root.thisMc.insideMc.myMc;

so i want to do something like this…

thisMc.newVar = myMc.SomeVar;

i can do that only if i use… \_root.

But i need those paths to be relatvie… is that possible?

the reason i ask is im creating a flash thing that dynamically loads movies into it, and i need to reference stuff correctly in order to work… i need the loaded mc to be pretty much indepentant and relative. =)

---

<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: [November 22, 2002, 9:27pm UTC](https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520/8 "2002-11-22T21:27:41Z")

</div>

Umm, can u rephrase that, i really can’t get what your trying to achieve, anyways, this should work, \_parent should be used when u try to access relative path, or accessing an absoulute, like:

```php
_root.MCParent.MCChiled.MCSubChiled.h88 = 23123

```

Try experimenting with the above code and the last post too, and tell me how it goes!

yours,  
h88

---

<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: [November 22, 2002, 9:52pm UTC](https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520/9 "2002-11-22T21:52:36Z")

</div>

im looking for something more like…

…/…/myMc.My2mc

…/ meaning go up one level in the hierarcy… just not sure how to do that.

---

<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: [November 22, 2002, 9:57pm UTC](https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520/10 "2002-11-22T21:57:54Z")

</div>

> …/…/myMc.My2mc

\_parent.\_parent.myMC.My2mc

---

<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: [November 22, 2002, 10:03pm UTC](https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520/11 "2002-11-22T22:03:37Z")

</div>

oh ok cool =)  
thanks alot ! =)

---

<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: [November 22, 2002, 10:04pm UTC](https://forum.kirupa.com/t/as-paths-and-stuff-mx/8520/12 "2002-11-22T22:04:19Z")

</div>

No problem. 🙂

PS. What a no. of posts u got Raydrad, 784392011.983, i wish i got the same number.
