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.