KeyListener = new Object();
KeyListener.onKeyDown = function(){
if(Key.getCode() == 65){ // key A
gotoAndPlay(05); // go to frame 5
} else if(Key.getCode() == 83){ // key S
gotoAndPlay(75); // go to frame 75
} else if(Key.getCode() == 68){ // key D
gotoAndPlay(145); // go to frame 145
} else if(Key.getCode() == 70){ // key F
gotoAndPlay(215); // go to frame 215
} else if(Key.getCode() == 71){ // key G
gotoAndPlay(285); // go to frame 285
}
}
Key.addListener(KeyListener);
No comments:
Post a Comment