|
-
keypress help
hey, i know that you can use the keypress with up,down,left,right and some other buttons,
but what is the script for normal letters, e.g. a, s, d, w
any help would be good, thanks
jason
-
Senior Member
You could use a button with a keyPress event,
Code:
on (keyPress "a") {
trace("a was pressed");
}
or have a listener object to detect keypresses,
Code:
var kl = {};
kl.onKeyDown = function() {
if (Key.getCode() == 65) {
trace("a was pressed");
} else if (Key.getCode() == 68) {
trace("d was pressed");
}
};
Key.addListener(kl);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|