Alright, I’m trying to make a little controlable sprite character. When I push Down on the keyboard I want it to go to frame 1 and play, when I release, i want it to go to frame 1 and stop. When I push up, I want it to go to frame 9 and play, when I release I want it to go to frame 9 and stop, how can this be down? (Sorry to the last guy who replied to my post, it didn’t work so I’m asking in a different way:/)
untested…
var frame, playing;
myMovieClip.onKeyDown = function() {
if (!playing) {
frame = this._currentframe;
if (Key.isDown(40)) this.gotoAndPlay(1);
if (Key.isDown(38)) this.gotoAndPlay(9);
playing = true;
}
};
myMovieClip.onKeyUp = function() {
this.gotoAndStop(frame);
playing = false;
};
Key.addListener(myMovieClip);