| Package | laya.events |
| Class | public dynamic class Event |
| Inheritance | Event Object |
| Subclasses | UIEvent |
Event 是事件类型的集合。一般当发生事件时,Event 对象将作为参数传递给事件侦听器。
| Property | Defined By | ||
|---|---|---|---|
| altKey : Boolean [read-only]
表示 Alt 键是处于活动状态 (true) 还是非活动状态 (false)。
| Event | ||
| charCode : Boolean [read-only]
包含按下或释放的键的字符代码值。字符代码值为英文键盘值。
| Event | ||
| ctrlKey : Boolean [read-only]
表示 Ctrl 键是处于活动状态 (true) 还是非活动状态 (false)。
| Event | ||
| currentTarget : Sprite 事件当前冒泡对象。 | Event | ||
| delta : int 滚轮滑动增量 | Event | ||
| keyCode : int 键盘值 | Event | ||
| keyLocation : uint [read-only]
表示键在键盘上的位置。这对于区分在键盘上多次出现的键非常有用。
例如,您可以根据此属性的值来区分左 Shift 键和右 Shift 键:左 Shift 键的值为 KeyLocation.LEFT,右 Shift 键的值为 KeyLocation.RIGHT。另一个示例是区分标准键盘 (KeyLocation.STANDARD) 与数字键盘 (KeyLocation.NUM_PAD) 上按下的数字键。
| Event | ||
| nativeEvent : * 原生浏览器事件。 | Event | ||
| shiftKey : Boolean [read-only]
表示 Shift 键是处于活动状态 (true) 还是非活动状态 (false)。
| Event | ||
| stageX : Number [read-only] 鼠标在 Stage 上的 X 轴坐标 | Event | ||
| stageY : Number [read-only] 鼠标在 Stage 上的 Y 轴坐标 | Event | ||
| target : Sprite 事件目标触发对象。 | Event | ||
| touches : Array [read-only]
触摸点列表。
| Event | ||
| touchId : int 分配给触摸点的唯一标识号(作为 int)。 | Event | ||
| type : String 事件类型。 | Event | ||
| Method | Defined By | ||
|---|---|---|---|
设置事件数据。
| Event | ||
stopPropagation():void
阻止对事件流中当前节点的后续节点中的所有事件侦听器进行处理。此方法不会影响当前节点 (currentTarget) 中的任何事件侦听器。
| Event | ||
| Constant | Defined By | ||
|---|---|---|---|
| ACTIVE_IN_HIERARCHY_CHANGED : String = activeinhierarchychanged [static] 定义 activeinhierarchychanged 事件对象的 type 属性值。 | Event | ||
| ADDED : String = added [static] 定义 added 事件对象的 type 属性值。 | Event | ||
| ANIMATION_CHANGED : String = animationchanged [static] 更换动作时触发。 | Event | ||
| BLUR : String = blur [static] 定义 blur 事件对象的 type 属性值。 | Event | ||
| CHANGE : String = change [static] 定义 change 事件对象的 type 属性值。 | Event | ||
| CHANGED : String = changed [static] 定义 changed 事件对象的 type 属性值。 | Event | ||
| CLICK : String = click [static] 定义 click 事件对象的 type 属性值。 | Event | ||
| CLOSE : String = close [static] 定义 close 事件对象的 type 属性值。 | Event | ||
| COMPLETE : String = complete [static] 定义 complete 事件对象的 type 属性值。 | Event | ||
| COMPONENT_ADDED : String = componentadded [static] 定义 componentadded 事件对象的 type 属性值。 | Event | ||
| COMPONENT_REMOVED : String = componentremoved [static] 定义 componentremoved 事件对象的 type 属性值。 | Event | ||
| DEVICE_LOST : String = devicelost [static] 显卡设备丢失时触发 | Event | ||
| DISPLAY : String = display [static] 定义 display 事件对象的 type 属性值。 | Event | ||
| DOUBLE_CLICK : String = doubleclick [static] 定义 doubleclick 事件对象的 type 属性值。 | Event | ||
| DRAG_END : String = dragend [static] 定义 dragend 事件对象的 type 属性值。 | Event | ||
| DRAG_MOVE : String = dragmove [static] 定义 dragmove 事件对象的 type 属性值。 | Event | ||
| DRAG_START : String = dragstart [static] 定义 dragstart 事件对象的 type 属性值。 | Event | ||
| EMPTY : Event [static] 一个空的 Event 对象。用于事件派发中转使用。 | Event | ||
| ENABLE_CHANGED : String = enablechanged [static] 定义 enablechanged 事件对象的 type 属性值。 | Event | ||
| END : String = end [static] 定义 end 事件对象的 type 属性值。 | Event | ||
| ENTER : String = enter [static] 定义 enter 事件对象的 type 属性值。 | Event | ||
| ERROR : String = error [static] 定义 error 事件对象的 type 属性值。 | Event | ||
| FOCUS : String = focus [static] 定义 focus 事件对象的 type 属性值。 | Event | ||
| FOCUS_CHANGE : String = focuschange [static] 定义 focuschange 事件对象的 type 属性值。 | Event | ||
| FRAME : String = enterframe [static] 定义 frame 事件对象的 type 属性值。 | Event | ||
| FULL_SCREEN_CHANGE : String = fullscreenchange [static] 浏览器全屏更改时触发 | Event | ||
| HIERARCHY_LOADED : String = hierarchyloaded [static] 定义 hierarchyloaded 事件对象的 type 属性值。 | Event | ||
| INPUT : String = input [static] 定义 input 事件对象的 type 属性值。 | Event | ||
| KEY_DOWN : String = keydown [static] 定义 keydown 事件对象的 type 属性值。 | Event | ||
| KEY_PRESS : String = keypress [static] 定义 keypress 事件对象的 type 属性值。 | Event | ||
| KEY_UP : String = keyup [static] 定义 keyup 事件对象的 type 属性值。 | Event | ||
| LABEL : String = label [static] 定义 label 事件对象的 type 属性值。 | Event | ||
| LAYER_CHANGED : String = layerchanged [static] 定义 layerchanged 事件对象的 type 属性值。 | Event | ||
| LINK : String = link [static] 定义 link 事件对象的 type 属性值。 | Event | ||
| LOADED : String = loaded [static] 定义 loaded 事件对象的 type 属性值。 | Event | ||
| MATERIAL_CHANGED : String = materialchanged [static] 材质更换时触发 | Event | ||
| MESH_CHANGED : String = meshchanged [static] 模型更换时触发 | Event | ||
| MESSAGE : String = message [static] 定义 message 事件对象的 type 属性值。 | Event | ||
| MOUSE_DOWN : String = mousedown [static] 定义 mousedown 事件对象的 type 属性值。 | Event | ||
| MOUSE_MOVE : String = mousemove [static] 定义 mousemove 事件对象的 type 属性值。 | Event | ||
| MOUSE_OUT : String = mouseout [static] 定义 mouseout 事件对象的 type 属性值。 | Event | ||
| MOUSE_OVER : String = mouseover [static] 定义 mouseover 事件对象的 type 属性值。 | Event | ||
| MOUSE_UP : String = mouseup [static] 定义 mouseup 事件对象的 type 属性值。 | Event | ||
| MOUSE_WHEEL : String = mousewheel [static] 定义 mousewheel 事件对象的 type 属性值。 | Event | ||
| OPEN : String = open [static] 定义 open 事件对象的 type 属性值。 | Event | ||
| PAUSED : String = paused [static] 定义 paused 事件对象的 type 属性值。 | Event | ||
| PLAYED : String = played [static] 定义 played 事件对象的 type 属性值。 | Event | ||
| PROGRESS : String = progress [static] 定义 progress 事件对象的 type 属性值。 | Event | ||
| RECOVERED : String = recovered [static] 定义 recovered 事件对象的 type 属性值。 | Event | ||
| RELEASED : String = released [static] 定义 released 事件对象的 type 属性值。 | Event | ||
| REMOVED : String = removed [static] 定义 removed 事件对象的 type 属性值。 | Event | ||
| RENDER : String = render [static] 定义 render 事件对象的 type 属性值。 | Event | ||
| RESIZE : String = resize [static] 定义 resize 事件对象的 type 属性值。 | Event | ||
| RIGHT_CLICK : String = rightclick [static] 定义 rightclick 事件对象的 type 属性值。 | Event | ||
| RIGHT_MOUSE_DOWN : String = rightmousedown [static] 定义 rightmousedown 事件对象的 type 属性值。 | Event | ||
| RIGHT_MOUSE_UP : String = rightmouseup [static] 定义 rightmouseup 事件对象的 type 属性值。 | Event | ||
| ROLL_OUT : String = mouseout [static] 定义 mouseout 事件对象的 type 属性值。 | Event | ||
| ROLL_OVER : String = mouseover [static] 定义 mouseover 事件对象的 type 属性值。 | Event | ||
| SELECT : String = select [static] 定义 select 事件对象的 type 属性值。 | Event | ||
| START : String = start [static] 定义 start 事件对象的 type 属性值。 | Event | ||
| STOPPED : String = stopped [static] 定义 stopped 事件对象的 type 属性值。 | Event | ||
| UNDISPLAY : String = undisplay [static] 定义 undisplay 事件对象的 type 属性值。 | Event | ||
| VISIBILITY_CHANGE : String = visibilitychange [static] 定义 visibilitychange 事件对象的 type 属性值。 | Event | ||
| WORLDMATRIX_NEEDCHANGE : String = worldmatrixneedchanged [static] 世界矩阵更新时触发。 | Event | ||
| altKey | property |
altKey:Boolean [read-only] 表示 Alt 键是处于活动状态 (true) 还是非活动状态 (false)。
public function get altKey():Boolean| charCode | property |
charCode:Boolean [read-only] 包含按下或释放的键的字符代码值。字符代码值为英文键盘值。
public function get charCode():Boolean| ctrlKey | property |
ctrlKey:Boolean [read-only] 表示 Ctrl 键是处于活动状态 (true) 还是非活动状态 (false)。
public function get ctrlKey():Boolean| currentTarget | property |
public var currentTarget:Sprite事件当前冒泡对象。
| delta | property |
public var delta:int滚轮滑动增量
| keyCode | property |
public var keyCode:int键盘值
| keyLocation | property |
keyLocation:uint [read-only] 表示键在键盘上的位置。这对于区分在键盘上多次出现的键非常有用。 例如,您可以根据此属性的值来区分左 Shift 键和右 Shift 键:左 Shift 键的值为 KeyLocation.LEFT,右 Shift 键的值为 KeyLocation.RIGHT。另一个示例是区分标准键盘 (KeyLocation.STANDARD) 与数字键盘 (KeyLocation.NUM_PAD) 上按下的数字键。
public function get keyLocation():uint| nativeEvent | property |
public var nativeEvent:*原生浏览器事件。
| shiftKey | property |
shiftKey:Boolean [read-only] 表示 Shift 键是处于活动状态 (true) 还是非活动状态 (false)。
public function get shiftKey():Boolean| stageX | property |
stageX:Number [read-only] 鼠标在 Stage 上的 X 轴坐标
public function get stageX():Number| stageY | property |
stageY:Number [read-only] 鼠标在 Stage 上的 Y 轴坐标
public function get stageY():Number| target | property |
public var target:Sprite事件目标触发对象。
| touches | property |
touches:Array [read-only] 触摸点列表。
public function get touches():Array| touchId | property |
public var touchId:int分配给触摸点的唯一标识号(作为 int)。
| type | property |
public var type:String事件类型。
| setTo | () | method |
public function setTo(type:String, currentTarget:Sprite, target:Sprite):Event设置事件数据。
Parameters
type:String — 事件类型。
| |
currentTarget:Sprite — 事件目标触发对象。
| |
target:Sprite — 事件当前冒泡对象。
|
Event — 返回当前 Event 对象。
|
| stopPropagation | () | method |
public function stopPropagation():void阻止对事件流中当前节点的后续节点中的所有事件侦听器进行处理。此方法不会影响当前节点 (currentTarget) 中的任何事件侦听器。
| ACTIVE_IN_HIERARCHY_CHANGED | Constant |
public static const ACTIVE_IN_HIERARCHY_CHANGED:String = activeinhierarchychanged定义 activeinhierarchychanged 事件对象的 type 属性值。
| ADDED | Constant |
public static const ADDED:String = added定义 added 事件对象的 type 属性值。
| ANIMATION_CHANGED | Constant |
public static const ANIMATION_CHANGED:String = animationchanged更换动作时触发。
| BLUR | Constant |
public static const BLUR:String = blur定义 blur 事件对象的 type 属性值。
| CHANGE | Constant |
public static const CHANGE:String = change定义 change 事件对象的 type 属性值。
| CHANGED | Constant |
public static const CHANGED:String = changed定义 changed 事件对象的 type 属性值。
| CLICK | Constant |
public static const CLICK:String = click定义 click 事件对象的 type 属性值。
| CLOSE | Constant |
public static const CLOSE:String = close定义 close 事件对象的 type 属性值。
| COMPLETE | Constant |
public static const COMPLETE:String = complete定义 complete 事件对象的 type 属性值。
| COMPONENT_ADDED | Constant |
public static const COMPONENT_ADDED:String = componentadded定义 componentadded 事件对象的 type 属性值。
| COMPONENT_REMOVED | Constant |
public static const COMPONENT_REMOVED:String = componentremoved定义 componentremoved 事件对象的 type 属性值。
| DEVICE_LOST | Constant |
public static const DEVICE_LOST:String = devicelost显卡设备丢失时触发
| DISPLAY | Constant |
public static const DISPLAY:String = display定义 display 事件对象的 type 属性值。
| DOUBLE_CLICK | Constant |
public static const DOUBLE_CLICK:String = doubleclick定义 doubleclick 事件对象的 type 属性值。
| DRAG_END | Constant |
public static const DRAG_END:String = dragend定义 dragend 事件对象的 type 属性值。
| DRAG_MOVE | Constant |
public static const DRAG_MOVE:String = dragmove定义 dragmove 事件对象的 type 属性值。
| DRAG_START | Constant |
public static const DRAG_START:String = dragstart定义 dragstart 事件对象的 type 属性值。
| EMPTY | Constant |
public static const EMPTY:Event一个空的 Event 对象。用于事件派发中转使用。
| ENABLE_CHANGED | Constant |
public static const ENABLE_CHANGED:String = enablechanged定义 enablechanged 事件对象的 type 属性值。
| END | Constant |
public static const END:String = end定义 end 事件对象的 type 属性值。
| ENTER | Constant |
public static const ENTER:String = enter定义 enter 事件对象的 type 属性值。
| ERROR | Constant |
public static const ERROR:String = error定义 error 事件对象的 type 属性值。
| FOCUS | Constant |
public static const FOCUS:String = focus定义 focus 事件对象的 type 属性值。
| FOCUS_CHANGE | Constant |
public static const FOCUS_CHANGE:String = focuschange定义 focuschange 事件对象的 type 属性值。
| FRAME | Constant |
public static const FRAME:String = enterframe定义 frame 事件对象的 type 属性值。
| FULL_SCREEN_CHANGE | Constant |
public static const FULL_SCREEN_CHANGE:String = fullscreenchange浏览器全屏更改时触发
| HIERARCHY_LOADED | Constant |
public static const HIERARCHY_LOADED:String = hierarchyloaded定义 hierarchyloaded 事件对象的 type 属性值。
| INPUT | Constant |
public static const INPUT:String = input定义 input 事件对象的 type 属性值。
| KEY_DOWN | Constant |
public static const KEY_DOWN:String = keydown定义 keydown 事件对象的 type 属性值。
| KEY_PRESS | Constant |
public static const KEY_PRESS:String = keypress定义 keypress 事件对象的 type 属性值。
| KEY_UP | Constant |
public static const KEY_UP:String = keyup定义 keyup 事件对象的 type 属性值。
| LABEL | Constant |
public static const LABEL:String = label定义 label 事件对象的 type 属性值。
| LAYER_CHANGED | Constant |
public static const LAYER_CHANGED:String = layerchanged定义 layerchanged 事件对象的 type 属性值。
| LINK | Constant |
public static const LINK:String = link定义 link 事件对象的 type 属性值。
| LOADED | Constant |
public static const LOADED:String = loaded定义 loaded 事件对象的 type 属性值。
| MATERIAL_CHANGED | Constant |
public static const MATERIAL_CHANGED:String = materialchanged材质更换时触发
| MESH_CHANGED | Constant |
public static const MESH_CHANGED:String = meshchanged模型更换时触发
| MESSAGE | Constant |
public static const MESSAGE:String = message定义 message 事件对象的 type 属性值。
| MOUSE_DOWN | Constant |
public static const MOUSE_DOWN:String = mousedown定义 mousedown 事件对象的 type 属性值。
| MOUSE_MOVE | Constant |
public static const MOUSE_MOVE:String = mousemove定义 mousemove 事件对象的 type 属性值。
| MOUSE_OUT | Constant |
public static const MOUSE_OUT:String = mouseout定义 mouseout 事件对象的 type 属性值。
| MOUSE_OVER | Constant |
public static const MOUSE_OVER:String = mouseover定义 mouseover 事件对象的 type 属性值。
| MOUSE_UP | Constant |
public static const MOUSE_UP:String = mouseup定义 mouseup 事件对象的 type 属性值。
| MOUSE_WHEEL | Constant |
public static const MOUSE_WHEEL:String = mousewheel定义 mousewheel 事件对象的 type 属性值。
| OPEN | Constant |
public static const OPEN:String = open定义 open 事件对象的 type 属性值。
| PAUSED | Constant |
public static const PAUSED:String = paused定义 paused 事件对象的 type 属性值。
| PLAYED | Constant |
public static const PLAYED:String = played定义 played 事件对象的 type 属性值。
| PROGRESS | Constant |
public static const PROGRESS:String = progress定义 progress 事件对象的 type 属性值。
| RECOVERED | Constant |
public static const RECOVERED:String = recovered定义 recovered 事件对象的 type 属性值。
| RELEASED | Constant |
public static const RELEASED:String = released定义 released 事件对象的 type 属性值。
| REMOVED | Constant |
public static const REMOVED:String = removed定义 removed 事件对象的 type 属性值。
| RENDER | Constant |
public static const RENDER:String = render定义 render 事件对象的 type 属性值。
| RESIZE | Constant |
public static const RESIZE:String = resize定义 resize 事件对象的 type 属性值。
| RIGHT_CLICK | Constant |
public static const RIGHT_CLICK:String = rightclick定义 rightclick 事件对象的 type 属性值。
| RIGHT_MOUSE_DOWN | Constant |
public static const RIGHT_MOUSE_DOWN:String = rightmousedown定义 rightmousedown 事件对象的 type 属性值。
| RIGHT_MOUSE_UP | Constant |
public static const RIGHT_MOUSE_UP:String = rightmouseup定义 rightmouseup 事件对象的 type 属性值。
| ROLL_OUT | Constant |
public static const ROLL_OUT:String = mouseout定义 mouseout 事件对象的 type 属性值。
| ROLL_OVER | Constant |
public static const ROLL_OVER:String = mouseover定义 mouseover 事件对象的 type 属性值。
| SELECT | Constant |
public static const SELECT:String = select定义 select 事件对象的 type 属性值。
| START | Constant |
public static const START:String = start定义 start 事件对象的 type 属性值。
| STOPPED | Constant |
public static const STOPPED:String = stopped定义 stopped 事件对象的 type 属性值。
| UNDISPLAY | Constant |
public static const UNDISPLAY:String = undisplay定义 undisplay 事件对象的 type 属性值。
| VISIBILITY_CHANGE | Constant |
public static const VISIBILITY_CHANGE:String = visibilitychange定义 visibilitychange 事件对象的 type 属性值。
| WORLDMATRIX_NEEDCHANGE | Constant |
public static const WORLDMATRIX_NEEDCHANGE:String = worldmatrixneedchanged世界矩阵更新时触发。