分类:
2010-03-22 15:14:47
在Movie Clip中捕捉键盘按键:
onClipEvent (keyDown) {
if (Key.getCode() == 65) {
trace("a");
}
}
|
||
键值: | 描述 | |
0x1 | 鼠标左键 | |
0x2 | 鼠标右键 | |
0x3 | CANCEL键 | |
0x4 | 鼠标中键 | |
0x8 | BACKSPACE键 | |
0x9 | TAB键 | |
0xC | CLEAR键 | |
0xD | ENTER键 | |
0x10 | SHIFT键 | |
0x11 | CTRL键 | |
0x12 | MENU键 | |
0x13 | PAUSE键 | |
0x14 | CAPS LOCK键 | |
0x1B | ESC键 | |
0x20 | SPACEBAR键 | |
0x21 | PAGE UP键 | |
0x22 | PAGE DOWN键 | |
0x23 | END键 | |
0x24 | HOME 键 | |
0x25 | LEFT ARROW键 | |
0x26 | UP ARROW键 | |
0x27 | RIGHT ARROW键 | |
0x28 | DOWN ARROW键 | |
0x29 | SELECT键 | |
0x2A | PRINT SCREEN键 | |
0x2B | EXECUTE键 | |
0x2C | SNAPSHOT键 | |
0x2D | INSERT键 | |
0x2E | DELETE键 | |
0x2F | HELP键 | |
0x90 | NUM LOCK键 | |
A 至 Z 键与 A – Z 字母的 ASCII 码相同: | ||
65 | A键 | |
66 | B键 | |
67 | C键 | |
68 | D键 | |
69 | E键 | |
70 | F键 | |
71 | G键 | |
72 | H键 | |
73 | I键 | |
74 | J键 | |
75 | K键 | |
76 | L键 | |
77 | M键 | |
78 | N键 | |
79 | O键 | |
80 | P键 | |
81 | Q键 | |
82 | R键 | |
83 | S键 | |
84 | T键 | |
85 | U键 | |
86 | V键 | |
87 | W键 | |
88 | X键 | |
89 | Y键 | |
90 | Z键 | |
0 至 9 键与数字 0 – 9 的 ASCII 码相同: | ||
0x60 | 0键 | |
0x61 | 1键 | |
0x62 | 2键 | |
0x63 | 3键 | |
0x64 | 4键 | |
0x65 | 5键 | |
0x66 | 6键 | |
0x67 | 7键 | |
0x68 | 8键 | |
0x69 | 9键 | |
0x6A | MULTIPLICATION SIGN (*) 键 | |
0x6B | PLUS SIGN (+) 键 | |
0x6C | ENTER 键 | |
0x6D | MINUS SIGN (–) 键 | |
0x6E | DECIMAL POINT (.) 键 | |
0x6F | DIVISION SIGN (/) 键 | |
下列常数代表功能键: | ||
0x70 | F1键 | |
0x71 | F2键 | |
0x72 | F3键 | |
0x73 | F4键 | |
0x74 | F5键 | |
0x75 | F6键 | |
0x76 | F7键 | |
0x77 | F8键 | |
0x78 | F9键 | |
0x79 | F10键 | |
0x7A | F11键 | |
0x7B | F12键 | |
0x7C | F13键 | |
0x7D | F14键 | |
0x7E | F15键 | |
0x7F | F16键 |