# \_root?

**URL:** <https://forum.kirupa.com/t/-root/18560>\
**Category:** flash\
**Created:** [April 18, 2003, 1:01am UTC](https://forum.kirupa.com/t/-root/18560 "2003-04-18T01:01:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suiside360](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/suiside360/32/85_2.png) [@Suiside360](https://forum.kirupa.com/u/Suiside360)\
**Post date:** [April 18, 2003, 1:01am UTC](https://forum.kirupa.com/t/-root/18560/1 "2003-04-18T01:01:20Z")

</div>

Can anyone give me a good explanation of what \_root is for and when the appropriate times are to use 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:** [April 18, 2003, 1:31am UTC](https://forum.kirupa.com/t/-root/18560/2 "2003-04-18T01:31:13Z")

</div>

[http://www.kirupa.com/developer/actionscript/tricks/root\_parent\_this.asp](http://www.kirupa.com/developer/actionscript/tricks/root_parent_this.asp)

---

<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:** [April 18, 2003, 3:20am UTC](https://forum.kirupa.com/t/-root/18560/3 "2003-04-18T03:20:43Z")

</div>

…I need a less complicated description than that. I’m very new to action scripting. I’ve used \_root before but i barely have any understanding of what i’m doing when i use it.:hat:

---

<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:** [April 18, 2003, 3:22am UTC](https://forum.kirupa.com/t/-root/18560/4 "2003-04-18T03:22:15Z")

</div>

\_root is a reference. It calls the main timeline of the movie. thats all you need to know. When you are targeting a movieclip that is on the main stage you would put:

\_root.NAMEOFMOVIECLIP

---

<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:** [April 18, 2003, 3:45am UTC](https://forum.kirupa.com/t/-root/18560/5 "2003-04-18T03:45:04Z")

</div>

That’s the answer i was looking for. I still need to do more projects so i can get a better understanding of \_root though.

---

<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:** [April 18, 2003, 6:54am UTC](https://forum.kirupa.com/t/-root/18560/6 "2003-04-18T06:54:01Z")

</div>

keep in mind… not only can you go all the way to the root and then work forward down a line of objects, but you can also step up the chain of objects from one to the one that contains it, to the one that contains that one, etc until you reach the \_root. This is done with the \_parent reference.

as simply put as possible. You have a movie clip called mc1 which contains on it’s timeline a movie clip called mc2 which contains on it’s timeline a movie clip called mc3.

If you are on the timeline of mc3 and you put in this  
trace(\_root.mc1.\_name);  
the output window will return “mc1”  
trace(\_parent.\_name);  
the output window will return “mc2”  
trace(\_parent.\_parent.\_name);  
the output window will return “mc1”

a good understanding of \_parent and \_root is very necessary as you explore action script, but it’s a lot let complex than it seems at first.

oh and no you can’t write \_root.\_root or \_root.\_parent and have it mean anything to the comp. Only \_parent works chained together in multiples like 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:** [April 18, 2003, 6:55am UTC](https://forum.kirupa.com/t/-root/18560/7 "2003-04-18T06:55:28Z")

</div>

once you understand those two, ask us about the “this” reference. 🙂

---

<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:** [April 18, 2003, 6:16pm UTC](https://forum.kirupa.com/t/-root/18560/8 "2003-04-18T18:16:08Z")

</div>

I understand what you’re saying because i used to use root in flash 5 except it was different. And plus i didn’t use any hand coding like i do now. I just need to get some projects done that use “root” and “this”. That will be the best way for me to get a better understanding of \_root, parent, and anything else of that nature.
