跳到主要内容

egret.MovieClipEvent

包    egret

类    public class MovieClipEvent

继承    egret.MovieClipEvent → egret.Event → egret.HashObject

当动画的当前帧有事件,将调度 MovieClipEvent 对象。帧事件类型 MovieClipEvent.FRAME_LABEL.

公共属性​

属性
FRAME_LABEL : string
[静态]动画的当前帧上有事件时调度
frameLabel : string
在 MovieClipEvent.FRAME_LABEL 事件中,event对应的字符串

公共方法​

方法
MovieClipEvent(type:string,bubbles:boolean,cancelable:boolean,frameLabel:string)
创建一个 MovieClipEvent 对象,其中包含有关帧事件的信息
dispatchMovieClipEvent(target:egret.IEventDispatcher,type:string,frameLabel:string):boolean
[静态]使用指定的EventDispatcher对象来抛出 MovieClipEvent 事件对象

属性详细信息​

FRAME_LABEL​

FRAME_LABEL : string = "frame_label"

  • 支持版本:Egret 2.4
  • 运行平台:Web,Native

动画的当前帧上有事件时调度

frameLabel​

frameLabel : string = null

  • 支持版本:Egret 2.4
  • 运行平台:Web,Native

在 MovieClipEvent.FRAME_LABEL 事件中,event对应的字符串。

方法详细信息​

MovieClipEvent()​

public MovieClipEvent(type:string,bubbles:boolean,cancelable:boolean,frameLabel:string)

创建一个 MovieClipEvent 对象,其中包含有关帧事件的信息。

  • 支持版本:Egret 2.4
  • 运行平台:Web,Native
  • 参数
    • type:string - 事件的类型,可以作为 MovieClipEvent.type 访问。
    • bubbles:boolean - 确定 Event 对象是否参与事件流的冒泡阶段。默认值为 false。
    • cancelable:boolean - 确定是否可以取消 Event 对象。默认值为 false。
    • frameLabel:string - 动画上的帧事件。事件侦听器可以通过 frameLabel 属性访问此信息。

dispatchMovieClipEvent()​

public dispatchMovieClipEvent(target:egret.IEventDispatcher,type:string,frameLabel:string):boolean

使用指定的EventDispatcher对象来抛出 MovieClipEvent 事件对象。抛出的对象将会缓存在对象池上,供下次循环复用。

  • 支持版本:Egret 2.4
  • 运行平台:Web,Native
  • 参数