# \_parent

**URL:** <https://forum.kirupa.com/t/-parent/8375>\
**Category:** flash\
**Created:** [November 19, 2002, 7:33pm UTC](https://forum.kirupa.com/t/-parent/8375 "2002-11-19T19:33:30Z")\
**Posts on this page:** 4\
**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 19, 2002, 7:33pm UTC](https://forum.kirupa.com/t/-parent/8375/1 "2002-11-19T19:33:30Z")

</div>

Alrighty, im loading in movies into a main swf movie.

Now i have to use \_parent, but for some reason what i want to do doesnt work…

ex:

this works…

\_root.myMc.myVar = 5;

this doesnt.

\_parent.myMc.myVar = 5;

Now the thing is ,and we all know this, when loaded into a movie, the \_root wont work because it’s looking at the \_root of the main movie, and not the loaded movie, (thats where \_parent comes in) but for some reason i see a limitation to this sytax, anyone care to help me? or am i just crazy?!

Thanks! =)

---

<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 19, 2002, 10:23pm UTC](https://forum.kirupa.com/t/-parent/8375/2 "2002-11-19T22:23:28Z")

</div>

Well if both the code and the object are on the same timline, you need no \_root or \_parent.

Did you try removing it all and testing it?

---

<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 20, 2002, 8:54am UTC](https://forum.kirupa.com/t/-parent/8375/3 "2002-11-20T08:54:50Z")

</div>

\_root will always refer to the base **level** in which a movie resides, so it depends how you load in your movies.

say you load B.swf into A.swf

if you load like this:

loadMovie(“B.swf”,myTarget);

then from B, \_root.refers to A because everything is in \_level0.

if you load like this:

loadMovieNum(“B.swf”,3);

then from B, \_root will refer to B because B is in \_level3.

to reference outside the **level** that a movie resides, you need to use an absolute level reference, ie. \_level0.

---

<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 20, 2002, 8:57am UTC](https://forum.kirupa.com/t/-parent/8375/4 "2002-11-20T08:57:00Z")

</div>

Very good to know sbeener… very good to know…

:::ponders why I didn’t know that already… then slams head into wall:::
