Keyboard Events
my keyboard functions are working fine, except after i jump to a frame and then use the back arrow key it only goes back through the even frames and then the odd frames. Any ideas on how to fix this?
stop();
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPressed);
function onKeyPressed(evt:KeyboardEvent):void {
switch (evt.keyCode) {
case Keyboard.ENTER:
if(this.currentFrame == 5){
gotoAndStop(10);
} else {
gotoAndStop(5);
}
//gotoAndStop(5);
break;
case Keyboard.RIGHT:
nextFrame();
break;
case Keyboard.LEFT:
prevFrame();
break; }
}