Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.

 

senocular.com ActionScript Library

definitions.as

Name: Definitions: more key definitions
Author: senocular: www.senocular.com
Date: 1899-12-31T00:01:43.900
Documentation:
originally from ultrashock.com
- assigns more properties in the key object for all the codes of the keys

easily used in an .as file "New_Key_Properties.as" and included with your movie

Usage:
#include "New_Key_Properties.as"

Example:
onClipEvent(keyDown){
	if (Key.isDown(Key.F4)) trace("You just hit the F4 key!");
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Key.A = 65;
Key.B = 66;
Key.C = 67;
Key.D = 68;
Key.E = 69;
Key.F = 70;
Key.G = 71;
Key.H = 72;
Key.I = 73;
Key.J = 74;
Key.K = 75;
Key.L = 76;
Key.M = 77;
Key.N = 78;
Key.O = 79;
Key.P = 80;
Key.Q = 81;
Key.R = 82;
Key.S = 83;
Key.T = 84;
Key.U = 85;
Key.V = 86;
Key.W = 87;
Key.X = 88;
Key.Y = 89;
Key.Z = 90;

Key.ZERO = 48;
Key.ONE = 49;
Key.TWO = 50;
Key.THREE = 51;
Key.FOUR = 52;
Key.FIVE = 53;
Key.SIX = 54;
Key.SEVEN = 55;
Key.EIGHT = 56;
Key.NINE = 57;

Key.NUMPAD_ZERO = 96;
Key.NUMPAD_ONE = 97;
Key.NUMPAD_TWO = 98;
Key.NUMPAD_THREE = 99;
Key.NUMPAD_FOUR = 100;
Key.NUMPAD_FIVE = 101;
Key.NUMPAD_SIX = 102;
Key.NUMPAD_SEVEN = 103;
Key.NUMPAD_EIGHT = 104;
Key.NUMPAD_NINE = 105;

Key.MULTIPLY = 106;
Key.ADD = 107;
Key.SUBTRACT = 109;
Key.DECIMAL = 110;
Key.DIVIDE = 111;

Key.F1 = 112;
Key.F2 = 113;
Key.F3 = 114;
Key.F4 = 115;
Key.F5 = 116;
Key.F6 = 117;
Key.F7 = 118;
Key.F8 = 119;
Key.F9 = 120;
Key.F10 = 121;
Key.F11 = 122;
Key.F12 = 123;

Key.CLEAR = 12;
Key.PAGEUP = 33;
Key.PAGEDOWN = 34;
Key.HELP = 47;
Key.NUMLOCK = 144;
Key.SEMICOLON = 186;
Key.EQUAL = 187;
Key.MINUS = 189;
Key.SLASH = 191;
Key.GRAVE = 192;
Key.OPENBRACKET = 219;
Key.BACKSLASH = 220;
Key.CLOSEBRACKET = 221;
Key.QUOTE = 222;