# Referring to var set in loaded mc

**URL:** <https://forum.kirupa.com/t/referring-to-var-set-in-loaded-mc/168586>\
**Category:** flash\
**Created:** [November 8, 2005, 3:06pm UTC](https://forum.kirupa.com/t/referring-to-var-set-in-loaded-mc/168586 "2005-11-08T15:06:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oli\_G](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@Oli\_G](https://forum.kirupa.com/u/Oli_G)\
**Post date:** [November 8, 2005, 3:06pm UTC](https://forum.kirupa.com/t/referring-to-var-set-in-loaded-mc/168586/1 "2005-11-08T15:06:10Z")

</div>

Hi all

I have 4 frames in an mc called sections\_mc. When a button in a seperate mc is rolled over, the frame in sections\_mc changes to the appropriate one.

However, when you rollout from the button, I want the sections\_mc to jump back to the current frame (that is, the section name of the mc currently loaded into holder\_mc on the \_root timeline, each called one, two, etc .swf).

Should I set a variable on the timeline of each swf to refer to?

Heres what I need, in a nutshell

this.butOne\_btn.onRollOut=function(){  
butOne\_btn.gotoAndPlay(“out”)  
root.section\_mc.gotoAndPlay(the same name of the movie currently loaded in \_root.holder\_mc, whether referring to a variable set in its root timeline or otherwise)  
}

Any ideas?

Cheers
