# Actionscript 2 inside a movie clip

**URL:** <https://forum.kirupa.com/t/actionscript-2-inside-a-movie-clip/314698>\
**Category:** flash\
**Created:** [October 6, 2010, 2:02pm UTC](https://forum.kirupa.com/t/actionscript-2-inside-a-movie-clip/314698 "2010-10-06T14:02:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwsimms](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@dwsimms](https://forum.kirupa.com/u/dwsimms)\
**Post date:** [October 6, 2010, 2:02pm UTC](https://forum.kirupa.com/t/actionscript-2-inside-a-movie-clip/314698/1 "2010-10-06T14:02:43Z")

</div>

On my main stage, I have 10 frames. In the first frame, I have a main menu that will be navigated using the keyboard. I converted the menu on that frame into a movie clip to keep things clean (I named the movie clip “menumovie”). Inside that movie clip I have 5 frames. Each frame has a highlight on it in different positions to represent selecting different options.

Here is the actionscript (as2) I used in the first frame to navigate to the second frame:

```auto

var eventListener = new Object();
eventListener.onKeyDown = function() {
    switch(Key.getCode())
    {
        case Key.DOWN:
            _root.menumovie.gotoAndStop(2);
            break;
        case Key.ENTER:
            _root.gotoAndStop(2);
            break;
    }
}

```

The function \_root.menumovie.gotoAndStop(2) is supposed to navigate to frame 2 inside the movie clip. But, nothing happens.

What am I doing wrong?
