用键盘控制上一帧和下一帧
stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_changeSlide);
function fl_changeSlide(evt:KeyboardEvent):void
{
if(evt.keyCode == 37) // LEFT
{
gotoAndStop(this.currentFrame-1);
}
else if (evt.keyCode == 39 || evt.keyCode == 32) // RIGHT OR SPACE
{
gotoAndStop(this.currentFrame+1);
}
}
stop();
|