# Arrow Keys

**URL:** https://forum.kirupa.com/t/arrow-keys/248936
**Category:** Uncategorized
**Created:** [January 13, 2008, 7:47pm UTC](https://forum.kirupa.com/t/arrow-keys/248936 "2008-01-13T19:47:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![small\_guy](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@small\_guy](https://forum.kirupa.com/u/small_guy)
#### Post date: [January 13, 2008, 7:47pm UTC](https://forum.kirupa.com/t/arrow-keys/248936/1 "2008-01-13T19:47:15Z")

</div>

I’ve got a movie clip that contains an animated character.

In the first frame of the movie clip I have the character facing forward. In the second frame of the movie clip I have the same character turning profile.

On the main timeline I have an instance of this movie clip with an instance name of Freddy\_mc.

The objective being that when the user presses the left arrow key the Freddy\_mc jumps to its next frame showing the animated character in profile.

All of this I have accomplished with the following code on my actions layer in my main timeline (and this much works fine):

var xv = 15;

Freddy\_mc.onEnterFrame = function ():Void {  
if (Key.isDown(Key.LEFT) {  
this.\_x -= xv;  
this.nextFrame();  
}

As I said, this much works fine.

My problem/question is this: when the left arrow key is released I want the Freddy\_mc to revert back to its frame one so that the character is once again facing front.

The obvious thought might be Key.isUp - except there is no such method of the Key class. Nor a Key.release.

Any thoughts would be appreciated.
