# Target a \_root frame label from inside MC

**URL:** <https://forum.kirupa.com/t/target-a--root-frame-label-from-inside-mc/227175>\
**Category:** flash\
**Created:** [May 28, 2007, 5:19am UTC](https://forum.kirupa.com/t/target-a--root-frame-label-from-inside-mc/227175 "2007-05-28T05:19:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohan](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@rohan](https://forum.kirupa.com/u/rohan)\
**Post date:** [May 28, 2007, 5:19am UTC](https://forum.kirupa.com/t/target-a--root-frame-label-from-inside-mc/227175/1 "2007-05-28T05:19:25Z")

</div>

Just wondering how this is done within an “if then” statement. I need a code like

if (\_root.frame = “home”) then {  
this.quickHome.onPress = function () {  
\_root.gotoAndPlay (“homeToContact”);  
}  
}

I know the first line isn’t going to work, but just wondering if someone knew of a code that would?

thanks in advance…

(btw \_root always targets the main time line correct? not just the timeline of a mc which the instance is placed in right?)
