# Loading multiple movies with keystrokes

**URL:** <https://forum.kirupa.com/t/loading-multiple-movies-with-keystrokes/221532>\
**Category:** flash\
**Created:** [April 4, 2007, 11:11pm UTC](https://forum.kirupa.com/t/loading-multiple-movies-with-keystrokes/221532 "2007-04-04T23:11:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpr](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@mpr](https://forum.kirupa.com/u/mpr)\
**Post date:** [April 4, 2007, 11:11pm UTC](https://forum.kirupa.com/t/loading-multiple-movies-with-keystrokes/221532/1 "2007-04-04T23:11:16Z")

</div>

I have a movie with a blank mc on the stage. I have it set up so that when you press the RIGHT keyboard key it loads another movie in that mc. Here’s the code for that:

```auto

stop();
this.onKeyDown = function() {
    if (Key.getCode() == Key.RIGHT) {
        loadMovie("ball.swf", blank_mc);
    } else if (Key.getCode() == Key.LEFT) {
        gotoAndPlay(2);
    }
};
Key.addListener(this);

```

If I have more than one movie, how do I code it so that when I press the RIGHT key again it loads another movie as well as goes back when I press the LEFT?
