Flash actionscript problems?

Phoenixneo

New member
I'm currently trying to work with keyboard inputs in flash (using actionscript 2.0). Just making a basic flash that will take you to a frame depending on what key you press (a, w, s, or d). For example, from the "a" page, you're supposed to be able to go anywhere else (the same for the other pages). From the "s", "w", or "d" pages, I can go to the "a" page only once. If I try again from any of those three, it doesn't work. What's causing my problem? Here's the actionscript I'm using for the "s" page:

keyListener.onKeyDown = function() {
if (Key.getCode() == 65) {
gotoAndStop(2);
}
if (Key.getCode() == 68) {
gotoAndStop(4);
}
if (Key.getCode() == 87) {
gotoAndStop(5);
}
};
Key.addListener(keyListener);

Please help.
 
Back
Top