# Reference in the Timeline

**URL:** <https://forum.kirupa.com/t/reference-in-the-timeline/245553>\
**Category:** Uncategorized\
**Created:** [November 30, 2007, 8:51pm UTC](https://forum.kirupa.com/t/reference-in-the-timeline/245553 "2007-11-30T20:51:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr\_n00](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mr\_n00](https://forum.kirupa.com/u/mr_n00)\
**Post date:** [November 30, 2007, 8:51pm UTC](https://forum.kirupa.com/t/reference-in-the-timeline/245553/1 "2007-11-30T20:51:25Z")

</div>

Hi folks,

I am building this site inAS3.0 and since it’s my very first one, and like everybody, i ran into head spinning problems.  
I am having some serious issues to reference some movieclips inside another movie clip.  
with the following code:

```auto
menu_mc.projectbt_menu.addEventListener(MouseEvent.CLICK, vaiMenu4);
menu_mc.contactbt_menu.addEventListener(MouseEvent.CLICK, vaiMenu4);
menu_mc.resumebt_menu.addEventListener(MouseEvent.CLICK, vaiMenu4);

menu_mc.projectbt_menu.FRAME = "PROJECT";    
menu_mc.contactbt_menu.FRAME = "CONTACT";
menu_mc.resumebt_menu.FRAME = "RESUME";

function vaiMenu4(Event:MouseEvent):void {
    gotoAndPlay(Event.target.FRAME);
    }  

```

It’s weird 'cos if i click again in the same button, it goes to the next frame (i have a stop in each frame, and the next frame has a different label.)So if i’m inside project, and i click in project again, it goes to contact…

I think the best idea is to build a custom class for those mcs. But i have no idea how to reference the frames in the main timeline in a external .as file. And i also guess, that i’ll still be getting the “continuous” play…

help please! 😉  
mr\_n00
