Class cc.Event

Class Summary
Constructor Attributes Constructor Name and Description
Base class of all kinds of events.

Method Summary

Class Detail

Base class of all kinds of events.

Field Detail

<static> <constant> cc.Event.ACCELERATION
The type code of Acceleration event.
<static> <constant> cc.Event.CUSTOM
The type code of Custom event.
<static> <constant> cc.Event.FOCUS
The type code of UI focus event.
<static> <constant> cc.Event.KEYBOARD
The type code of Keyboard event.
<static> <constant> cc.Event.MOUSE
The type code of Mouse event.
<static> <constant> cc.Event.TOUCH
The type code of Touch event.

Method Detail

  • {cc.Node} getCurrentTarget()

    Gets current target of the event
    note: It only be available when the event listener is associated with node.
    It returns 0 when the listener is associated with fixed priority.

    {cc.Node} The target with which the event associates.
  • {Number} getType()
    Gets the event type
  • {boolean} isStopped()
    Checks whether the event has been stopped
  • stopPropagation()
    Stops propagation for current event