Show:

annie.Event Class

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

Available since 1.0.0

事件类,annie引擎中一切事件的基类

Item Index

Properties

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

Defined in libs/Event.js:28

Available since 1.0.0

Parameters:

reset

(
  • type
  • target
)
Void public

Defined in libs/Event.js:84

Available since 2.0.0

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

Parameters:

Returns:

Void:

stopImmediatePropagation

() Void public

Defined in libs/Event.js:69

Available since 2.0.0

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

Returns:

Void:

Properties

ABORT

String public static

Defined in libs/Event.js:295

Available since 1.0.0

annie.URLLoader中断事件

ADD_TO_STAGE

String public static

Defined in libs/Event.js:223

Available since 1.0.0

annie.DisplayObject显示对象加入到舞台事件

CALL_FRAME

String public static

Defined in libs/Event.js:259

Available since 1.0.0

annie.MovieClip 帧标签事件

COMPLETE

String public static

Defined in libs/Event.js:268

Available since 1.0.0

完成事件

data

Any public

Defined in libs/Event.js:53

Available since 1.0.0

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

Default: null

END_FRAME

String public static

Defined in libs/Event.js:250

Available since 1.0.0

annie.MovieClip 播放完成事件

ENTER_FRAME

String public static

Defined in libs/Event.js:241

Available since 1.0.0

annie.DisplayObject显示对象 循环帧事件

ERROR

String public static

Defined in libs/Event.js:286

Available since 1.0.0

annie.URLLoader出错事件

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类都有一个实例类型字符串,通过这个字符串,你能知道这个实例是从哪个类实例而来

ON_DRAW_PERCENT

String public static

Defined in libs/Event.js:331

Available since 1.0.9

annie.ScratchCard 刮刮卡事件,刮了多少,一个百分比

ON_FLIP_START

String static

Defined in libs/Event.js:151

Available since 1.1.0

annie.FlipBook组件翻页开始事件

ON_FLIP_STOP

String static

Defined in libs/Event.js:159

Available since 1.1.0

annie.FlipBook组件翻页结束事件

ON_INIT_STAGE

String public static

Defined in libs/Event.js:99

Available since 1.0.0

annie.Stage舞台初始化完成后会触发的事件

ON_PLAY_END

String static

Defined in libs/Event.js:135

Available since 1.1.0

annie.Media相关媒体类的播放完成事件。像annie.Sound annie.Video都可以捕捉这种事件。

ON_PLAY_START

String static

Defined in libs/Event.js:143

Available since 1.1.0

annie.Media相关媒体类的开始播放事件。像annie.Sound annie.Video都可以捕捉这种事件。

ON_PLAY_UPDATE

String static

Defined in libs/Event.js:127

Available since 1.1.0

annie.Media相关媒体类的播放刷新事件。像annie.Sound annie.Video都可以捕捉这种事件。

ON_RUN_CHANGED

String public static

Defined in libs/Event.js:118

Available since 1.0.0

annie引擎暂停或者恢复暂停时触发,这个事件只能在annie.globalDispatcher中监听

ON_SCROLL_ING

String static

Defined in libs/Event.js:191

Available since 3.1.0

annie.Scroller组件开始滑动事件

ON_SCROLL_START

String static

Defined in libs/Event.js:183

Available since 1.1.0

annie.ScrollPage组件开始滑动事件

ON_SCROLL_STOP

String static

Defined in libs/Event.js:175

Available since 1.1.0

annie.ScrollPage组件停止滑动事件

ON_SCROLL_TO_END

String static

Defined in libs/Event.js:199

Available since 1.1.0

annie.ScrollPage组件滑动到结束位置事件

ON_SCROLL_TO_HEAD

String static

Defined in libs/Event.js:167

Available since 1.1.0

annie.ScrollPage组件滑动到开始位置事件

ON_SLIDE_END

String static

Defined in libs/Event.js:215

Available since 1.1.0

annie.Slide 组件结束滑动事件

ON_SLIDE_START

String static

Defined in libs/Event.js:207

Available since 1.1.0

annie.Slide 组件开始滑动事件

PROGRESS

String public static

Defined in libs/Event.js:277

Available since 1.0.0

annie.URLLoader加载过程事件

REMOVE_TO_STAGE

String public static

Defined in libs/Event.js:232

Available since 1.0.0

annie.DisplayObject显示对象从舞台移出事件

RESIZE

String public static

Defined in libs/Event.js:108

Available since 1.0.0

小游戏不支持 小程序不支持

annie.Stage舞台尺寸发生变化时触发

START

String public static

Defined in libs/Event.js:304

Available since 1.0.0

annie.URLLoader开始事件

target

Any public

Defined in libs/Event.js:44

Available since 1.0.0

触发此事件的对象

Default: null

TIMER

String public static

Defined in libs/Event.js:313

Available since 1.0.9

annie.Timer定时器触发事件

TIMER_COMPLETE

String public static

Defined in libs/Event.js:322

Available since 1.0.9

annie.Timer定时器完成事件

type

String public

Defined in libs/Event.js:36

Available since 1.0.0

事件类型名