Show:

annie.MouseEvent Class

Extends annie.Event
Defined in: libs/MouseEvent.js:19
Module: annie

Available since 1.0.0

鼠标事件类,电脑端鼠标,移动设备端的触摸都使用此事件来监听

Methods

destroy

() Void public

Inherited from annie.AObject: libs/EventDispatcher.js:63

Available since 2.0.0

销毁一个对象 销毁之前一定要做完其他善后工作,否则有可能会出错 特别注意不能在对象自身方法或事件里调用此方法。 比如,不要在显示对象自身的 annie.Event.ON_REMOVE_TO_STAGE 或者其他类似事件调用,一定会报错

Returns:

Void:

Event

(
  • type
)
public

Inherited from annie.Event: libs/Event.js:28

Available since 1.0.0

Parameters:

MouseEvent

(
  • type
)
public

Defined in libs/MouseEvent.js:28

Available since 1.0.0

Parameters:

reset

(
  • type
  • target
)
Void public

Inherited from annie.Event: libs/Event.js:84

Available since 2.0.0

重置事件到初始状态方便重复利用

Parameters:

Returns:

Void:

stopImmediatePropagation

() Void public

Inherited from annie.Event: libs/Event.js:69

Available since 2.0.0

防止对事件流中当前节点中和所有后续节点中的事件侦听器进行处理。

Returns:

Void:

updateAfterEvent

() Void public

Defined in libs/MouseEvent.js:110

Available since 1.0.9

事件后立即更新显示列表状态

Returns:

Void:

Properties

CLICK

String public static

Defined in libs/MouseEvent.js:144

Available since 1.0.0

annie.DisplayObject鼠标或者手指单击

clientX

Number public

Defined in libs/MouseEvent.js:36

Available since 1.0.0

mouse或touch事件时rootDiv坐标x点

clientY

Number public

Defined in libs/MouseEvent.js:44

Available since 1.0.0

mouse或touch事件时rootDiv坐标y点

currentTarget

annie.DisplayObject public

Defined in libs/MouseEvent.js:84

Available since 1.0.0

绑定此事件的侦听对象

Default: null

data

Any public

Inherited from annie.Event: libs/Event.js:53

Available since 1.0.0

随着事件一起附带的信息对象 所有需要随事件一起发送的信息都可以放在此对象中

Default: null

identifier

Number public

Defined in libs/MouseEvent.js:93

Available since 1.1.2

触摸或者鼠标事件的手指唯一标识

instanceId

Number public

Inherited from annie.AObject: libs/EventDispatcher.js:31

Available since 1.0.0

每一个annie引擎对象都会有一个唯一的id码。

Example:

 //获取 annie引擎类对象唯一码
 console.log(this.instanceId);

instanceType

String public

Inherited from annie.AObject: libs/EventDispatcher.js:49

Available since 1.0.3

每一个annie类都有一个实例类型字符串,通过这个字符串,你能知道这个实例是从哪个类实例而来

localX

Number public

Defined in libs/MouseEvent.js:68

Available since 1.0.0

mouse或touch事件时本地坐标x点

localY

Number public

Defined in libs/MouseEvent.js:76

Available since 1.0.0

mouse或touch事件时本地坐标y点

MOUSE_DOWN

String public static

Defined in libs/MouseEvent.js:126

Available since 1.0.0

annie.DisplayObject鼠标或者手指按下事件

MOUSE_MOVE

String public static

Defined in libs/MouseEvent.js:153

Available since 1.0.0

annie.DisplayObject鼠标或者手指移动事件

MOUSE_OUT

String public static

Defined in libs/MouseEvent.js:171

Available since 1.0.0

annie.DisplayObject鼠标或者手指移出显示对象边界触发的事件

MOUSE_OVER

String public static

Defined in libs/MouseEvent.js:162

Available since 1.0.0

annie.DisplayObject鼠标或者手指移入到显示对象上里触发的事件

MOUSE_UP

String public static

Defined in libs/MouseEvent.js:135

Available since 1.0.0

annie.DisplayObject鼠标或者手指抬起事件

stageX

Number public

Defined in libs/MouseEvent.js:52

Available since 1.0.0

mouse或touch事件时全局坐标x点

stageY

Number public

Defined in libs/MouseEvent.js:60

Available since 1.0.0

mouse或touch事件时全局坐标y点

target

Any public

Inherited from annie.Event: libs/Event.js:44

Available since 1.0.0

触发此事件的对象

Default: null

timeStamp

Number

当前时间戳

type

String public

Inherited from annie.Event: libs/Event.js:36

Available since 1.0.0

事件类型名