flash.ui
public final class Keyboard
继承Keyboard Inheritance Object

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

Keyboard 类用于构建用户可使用标准键盘控制的界面。 不必使用构造函数即可使用 Keyboard 类的方法和属性。 Keyboard 类的属性是一些常数,这些常数表示控制游戏时最常用的键。

另请参见

捕获键盘输入



公共 属性
 属性定义方
  capsLock : Boolean
[static] [read-only] 指定激活 (true) 或不激活 (false) Caps Lock。
Keyboard
 Inheritedconstructor : Object
对类对象或给定对象实例的构造函数的引用。
Object
  numLock : Boolean
[static] [read-only] 指定激活 (true) 或不激活 (false) Num Lock。
Keyboard
 Inheritedprototype : Object
[static] 对类或函数对象的原型对象的引用。
Object
公共 方法
 方法定义方
 Inherited
指示对象是否已经定义了指定的属性。
Object
  
[static] 指定其它 SWF 文件能否访问最后按下的键。
Keyboard
 Inherited
指示 Object 类的实例是否在指定为参数的对象的原型链中。
Object
 Inherited
指示指定的属性是否存在、是否可枚举。
Object
 Inherited
设置循环操作动态属性的可用性。
Object
 Inherited
返回指定对象的字符串表示形式。
Object
 Inherited
返回指定对象的原始值。
Object
公共 常量
 常量定义方
  BACKSPACE : uint = 8
[static] 与 Backspace 的键控代码值 (8) 关联的常数。
Keyboard
  CAPS_LOCK : uint = 20
[static] 与 Caps Lock 的键控代码值 (20) 关联的常数。
Keyboard
  CONTROL : uint = 17
[static] 与 Ctrl 的键控代码值 (17) 关联的常数。
Keyboard
  DELETE : uint = 46
[static] 与 Delete 的键控代码值 (46) 关联的常数。
Keyboard
  DOWN : uint = 40
[static] 与向下箭头键的键控代码值 (40) 关联的常数。
Keyboard
  END : uint = 35
[static] 与 End 的键控代码值 (35) 关联的常数。
Keyboard
  ENTER : uint = 13
[static] 与 Enter 的键控代码值 (13) 关联的常数。
Keyboard
  ESCAPE : uint = 27
[static] 与 Esc 的键控代码值 (27) 关联的常数。
Keyboard
  F1 : uint = 112
[static] 与 F1 的键控代码值 (112) 关联的常数。
Keyboard
  F10 : uint = 121
[static] 与 F10 的键控代码值 (121) 关联的常数。
Keyboard
  F11 : uint = 122
[static] 与 F11 的键控代码值 (122) 关联的常数。
Keyboard
  F12 : uint = 123
[static] 与 F12 的键控代码值 (123) 关联的常数。
Keyboard
  F13 : uint = 124
[static] 与 F13 的键控代码值 (124) 关联的常数。
Keyboard
  F14 : uint = 125
[static] 与 F14 的键控代码值 (125) 关联的常数。
Keyboard
  F15 : uint = 126
[static] 与 F15 的键控代码值 (126) 关联的常数。
Keyboard
  F2 : uint = 113
[static] 与 F2 的键控代码值 (113) 关联的常数。
Keyboard
  F3 : uint = 114
[static] 与 F3 的键控代码值 (114) 关联的常数。
Keyboard
  F4 : uint = 115
[static] 与 F4 的键控代码值 (115) 关联的常数。
Keyboard
  F5 : uint = 116
[static] 与 F5 的键控代码值 (116) 关联的常数。
Keyboard
  F6 : uint = 117
[static] 与 F6 的键控代码值 (117) 关联的常数。
Keyboard
  F7 : uint = 118
[static] 与 F7 的键控代码值 (118) 关联的常数。
Keyboard
  F8 : uint = 119
[static] 与 F8 的键控代码值 (119) 关联的常数。
Keyboard
  F9 : uint = 120
[static] 与 F9 的键控代码值 (120) 关联的常数。
Keyboard
  HOME : uint = 36
[static] 与 Home 的键控代码值 (36) 关联的常数。
Keyboard
  INSERT : uint = 45
[static] 与 Insert 的键控代码值 (45) 关联的常数。
Keyboard
  LEFT : uint = 37
[static] 与向左箭头键的键控代码值 (37) 关联的常数。
Keyboard
  NUMPAD_0 : uint = 96
[static] 与数字键盘上的数字 0 的键控代码值 (96) 关联的常数。
Keyboard
  NUMPAD_1 : uint = 97
[static] 与数字键盘上的数字 1 的键控代码值 (97) 关联的常数。
Keyboard
  NUMPAD_2 : uint = 98
[static] 与数字键盘上的数字 2 的键控代码值 (98) 关联的常数。
Keyboard
  NUMPAD_3 : uint = 99
[static] 与数字键盘上的数字 3 的键控代码值 (99) 关联的常数。
Keyboard
  NUMPAD_4 : uint = 100
[static] 与数字键盘上的数字 4 的键控代码值 (100) 关联的常数。
Keyboard
  NUMPAD_5 : uint = 101
[static] 与数字键盘上的数字 5 的键控代码值 (101) 关联的常数。
Keyboard
  NUMPAD_6 : uint = 102
[static] 与数字键盘上的数字 6 的键控代码值 (102) 关联的常数。
Keyboard
  NUMPAD_7 : uint = 103
[static] 与数字键盘上的数字 7 的键控代码值 (103) 关联的常数。
Keyboard
  NUMPAD_8 : uint = 104
[static] 与数字键盘上的数字 8 的键控代码值 (104) 关联的常数。
Keyboard
  NUMPAD_9 : uint = 105
[static] 与数字键盘上的数字 9 的键控代码值 (105) 关联的常数。
Keyboard
  NUMPAD_ADD : uint = 107
[static] 与数字键盘上的加号 (+) 的键控代码值 (107) 关联的常数。
Keyboard
  NUMPAD_DECIMAL : uint = 110
[static] 与数字键盘上的小数点 (.) 的键控代码值 (110) 关联的常数。
Keyboard
  NUMPAD_DIVIDE : uint = 111
[static] 与数字键盘上的除号 (/) 的键控代码值 (111) 关联的常数。
Keyboard
  NUMPAD_ENTER : uint = 108
[static] 与数字键盘上的 Enter 的键控代码值 (108) 关联的常数。
Keyboard
  NUMPAD_MULTIPLY : uint = 106
[static] 与数字键盘上的乘号 (*) 的键控代码值 (106) 关联的常数。
Keyboard
  NUMPAD_SUBTRACT : uint = 109
[static] 与数字键盘上的减号 (-) 的键控代码值 (109) 关联的常数。
Keyboard
  PAGE_DOWN : uint = 34
[static] 与 Page Down 的键控代码值 (34) 关联的常数。
Keyboard
  PAGE_UP : uint = 33
[static] 与 Page Up 的键控代码值 (33) 关联的常数。
Keyboard
  RIGHT : uint = 39
[static] 与向右箭头键的键控代码值 (39) 关联的常数。
Keyboard
  SHIFT : uint = 16
[static] 与 Shift 的键控代码值 (16) 关联的常数。
Keyboard
  SPACE : uint = 32
[static] 与空格键的键控代码值 (32) 关联的常数。
Keyboard
  TAB : uint = 9
[static] 与 Tab 的键控代码值 (9) 关联的常数。
Keyboard
  UP : uint = 38
[static] 与向上箭头键的键控代码值 (38) 关联的常数。
Keyboard
属性详细信息
capsLock属性
capsLock:Boolean  [read-only]

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

指定激活 (true) 或不激活 (false) Caps Lock。


实现
    public static function get capsLock():Boolean
numLock属性 
numLock:Boolean  [read-only]

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

指定激活 (true) 或不激活 (false) Num Lock。


实现
    public static function get numLock():Boolean
方法详细信息
isAccessible()方法
public static function isAccessible():Boolean

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

指定其它 SWF 文件能否访问最后按下的键。 默认情况下,安全限制会阻止某一个域中的 SWF 文件的代码访问从另一个域中的 SWF 文件生成的键击。

返回
Boolean — 值 true(如果可以访问按下的最后一个键)。 如果不允许访问,则此方法返回 false
常量详细信息
BACKSPACE常量
public static const BACKSPACE:uint = 8

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 Backspace 的键控代码值 (8) 关联的常数。

CAPS_LOCK常量 
public static const CAPS_LOCK:uint = 20

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 Caps Lock 的键控代码值 (20) 关联的常数。

CONTROL常量 
public static const CONTROL:uint = 17

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 Ctrl 的键控代码值 (17) 关联的常数。

DELETE常量 
public static const DELETE:uint = 46

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 Delete 的键控代码值 (46) 关联的常数。

DOWN常量 
public static const DOWN:uint = 40

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与向下箭头键的键控代码值 (40) 关联的常数。

END常量 
public static const END:uint = 35

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 End 的键控代码值 (35) 关联的常数。

ENTER常量 
public static const ENTER:uint = 13

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 Enter 的键控代码值 (13) 关联的常数。

ESCAPE常量 
public static const ESCAPE:uint = 27

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 Esc 的键控代码值 (27) 关联的常数。

F1常量 
public static const F1:uint = 112

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F1 的键控代码值 (112) 关联的常数。

F10常量 
public static const F10:uint = 121

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F10 的键控代码值 (121) 关联的常数。

F11常量 
public static const F11:uint = 122

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F11 的键控代码值 (122) 关联的常数。

F12常量 
public static const F12:uint = 123

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F12 的键控代码值 (123) 关联的常数。

F13常量 
public static const F13:uint = 124

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F13 的键控代码值 (124) 关联的常数。

F14常量 
public static const F14:uint = 125

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F14 的键控代码值 (125) 关联的常数。

F15常量 
public static const F15:uint = 126

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F15 的键控代码值 (126) 关联的常数。

F2常量 
public static const F2:uint = 113

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F2 的键控代码值 (113) 关联的常数。

F3常量 
public static const F3:uint = 114

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F3 的键控代码值 (114) 关联的常数。

F4常量 
public static const F4:uint = 115

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F4 的键控代码值 (115) 关联的常数。

F5常量 
public static const F5:uint = 116

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F5 的键控代码值 (116) 关联的常数。

F6常量 
public static const F6:uint = 117

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F6 的键控代码值 (117) 关联的常数。

F7常量 
public static const F7:uint = 118

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F7 的键控代码值 (118) 关联的常数。

F8常量 
public static const F8:uint = 119

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F8 的键控代码值 (119) 关联的常数。

F9常量 
public static const F9:uint = 120

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 F9 的键控代码值 (120) 关联的常数。

HOME常量 
public static const HOME:uint = 36

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 Home 的键控代码值 (36) 关联的常数。

INSERT常量 
public static const INSERT:uint = 45

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 Insert 的键控代码值 (45) 关联的常数。

LEFT常量 
public static const LEFT:uint = 37

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与向左箭头键的键控代码值 (37) 关联的常数。

NUMPAD_0常量 
public static const NUMPAD_0:uint = 96

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的数字 0 的键控代码值 (96) 关联的常数。

NUMPAD_1常量 
public static const NUMPAD_1:uint = 97

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的数字 1 的键控代码值 (97) 关联的常数。

NUMPAD_2常量 
public static const NUMPAD_2:uint = 98

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的数字 2 的键控代码值 (98) 关联的常数。

NUMPAD_3常量 
public static const NUMPAD_3:uint = 99

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的数字 3 的键控代码值 (99) 关联的常数。

NUMPAD_4常量 
public static const NUMPAD_4:uint = 100

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的数字 4 的键控代码值 (100) 关联的常数。

NUMPAD_5常量 
public static const NUMPAD_5:uint = 101

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的数字 5 的键控代码值 (101) 关联的常数。

NUMPAD_6常量 
public static const NUMPAD_6:uint = 102

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的数字 6 的键控代码值 (102) 关联的常数。

NUMPAD_7常量 
public static const NUMPAD_7:uint = 103

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的数字 7 的键控代码值 (103) 关联的常数。

NUMPAD_8常量 
public static const NUMPAD_8:uint = 104

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的数字 8 的键控代码值 (104) 关联的常数。

NUMPAD_9常量 
public static const NUMPAD_9:uint = 105

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的数字 9 的键控代码值 (105) 关联的常数。

NUMPAD_ADD常量 
public static const NUMPAD_ADD:uint = 107

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的加号 (+) 的键控代码值 (107) 关联的常数。

NUMPAD_DECIMAL常量 
public static const NUMPAD_DECIMAL:uint = 110

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的小数点 (.) 的键控代码值 (110) 关联的常数。

NUMPAD_DIVIDE常量 
public static const NUMPAD_DIVIDE:uint = 111

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的除号 (/) 的键控代码值 (111) 关联的常数。

NUMPAD_ENTER常量 
public static const NUMPAD_ENTER:uint = 108

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的 Enter 的键控代码值 (108) 关联的常数。

NUMPAD_MULTIPLY常量 
public static const NUMPAD_MULTIPLY:uint = 106

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的乘号 (*) 的键控代码值 (106) 关联的常数。

NUMPAD_SUBTRACT常量 
public static const NUMPAD_SUBTRACT:uint = 109

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与数字键盘上的减号 (-) 的键控代码值 (109) 关联的常数。

PAGE_DOWN常量 
public static const PAGE_DOWN:uint = 34

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 Page Down 的键控代码值 (34) 关联的常数。

PAGE_UP常量 
public static const PAGE_UP:uint = 33

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 Page Up 的键控代码值 (33) 关联的常数。

RIGHT常量 
public static const RIGHT:uint = 39

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与向右箭头键的键控代码值 (39) 关联的常数。

SHIFT常量 
public static const SHIFT:uint = 16

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 Shift 的键控代码值 (16) 关联的常数。

SPACE常量 
public static const SPACE:uint = 32

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与空格键的键控代码值 (32) 关联的常数。

TAB常量 
public static const TAB:uint = 9

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与 Tab 的键控代码值 (9) 关联的常数。

UP常量 
public static const UP:uint = 38

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

与向上箭头键的键控代码值 (38) 关联的常数。





 

评论添加到页面后给我发送电子邮件 | 评论报告

当前页: http://livedocs.adobe.com/flash/9.0_cn/ActionScriptLangRefV3/flash/ui/Keyboard.html