# Help with AS3 movieclip referencing

**URL:** <https://forum.kirupa.com/t/help-with-as3-movieclip-referencing/323779>\
**Category:** Uncategorized\
**Created:** [July 18, 2011, 12:21am UTC](https://forum.kirupa.com/t/help-with-as3-movieclip-referencing/323779 "2011-07-18T00:21:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![keenseed](https://avatars.discourse-cdn.com/v4/letter/k/54ee81/32.png) [@keenseed](https://forum.kirupa.com/u/keenseed)\
**Post date:** [July 18, 2011, 12:21am UTC](https://forum.kirupa.com/t/help-with-as3-movieclip-referencing/323779/1 "2011-07-18T00:21:44Z")

</div>

Hey all, I’m somewhat new to AS3 and I am trying to make a reference to a movieclip instance that is in another movieclip.

Here’s the deal: I have a main timeline for different pages of a website…then within that I make all of the art on each page into a movieclip so I can do animations every time that main timeline frame is called to, yet still keep my main timeline clean.

Within one page’s movieclip I have a few buttons that I want to use to go to other pages by referencing them on the main timeline.

I have been using this: (home\_about is the about us button on my home page, and frame 31 is on the main timeline).

home\_about.addEventListener(MouseEvent.CLICK, fl\_ClickToGoToAndPlayFromFrame\_6);

function fl\_ClickToGoToAndPlayFromFrame\_6(event:MouseEvent):void  
{  
gotoAndPlay(31);  
}

Since this home\_about is within another movieclip, I get the access of undefined property error. Do I need to change the code I’ve pasted above or add in variable definitions to fix this? If so, how do I do it :h:

Thanks! And sorry for the noob question haha…
