Class createjs.Event
Extends
.
Defined in: event.js.
Constructor Attributes | Constructor Name and Description |
---|---|
createjs.Event(type, bubbles, cancelable)
A base class for all CreateJS events.
|
Field Attributes | Field Name and Description |
---|---|
Indicates whether the event will bubble through CreateJS objects.
|
|
Indicates whether the Event.prototype.preventDefault() method can prevent the
default behavior of an event.
|
|
Whether a handler has called the Event.prototype.preventDefault() method.
|
|
Indicates the current event phase:
1.
|
|
Whether a handler has called the Event.stopImmediatePropagation() method.
|
|
<static> |
createjs.Event.KeyCodes
Key codes for common characters.
|
Whether a handler has called the Event.prototype.stopPropagation() method or
the Event.prototype.stopImmediatePropagation() method.
|
|
Whether a handler has called the Event.prototype.remove() method.
|
|
The epoch time at which this event was created.
|
|
The type of this event.
|
Method Attributes | Method Name and Description |
---|---|
Resets the properties used by event targets.
|
|
setProperties(target, phase)
Sets properties used by event targets.
|
|
Stops the immediate event propagation.
|
|
<static> |
createjs.Event.Target()
An interface that adds event listeners or removes them.
|
Class Detail
createjs.Event(type, bubbles, cancelable)
A base class for all CreateJS events. A CreateJS event is an event dispatched
through CreateJS objects. It consists of events encapsulating DOM events
(e.g. mouse events, load events, etc.) and events fired by CreateJS objects
(e.g. animation events, tick events.) It is slow to bubble events on old
Android devices (4.3 or earlier) and this class currently disables event
bubbling.
- Parameters:
- {string} type
- {boolean} bubbles
- {boolean} cancelable
Field Detail
bubbles
Indicates whether the event will bubble through CreateJS objects. (This
feature is disabled.)
cancelable
Indicates whether the Event.prototype.preventDefault() method can prevent the
default behavior of an event. For CreateJS events encapsulating DOM events,
their default behaviors are dispatching DOM events to the ancestors of the
defaultPrevented
Whether a handler has called the Event.prototype.preventDefault() method.
(This event is not exported to games.)
eventPhase
Indicates the current event phase:
1. Capture phase: starting from the top parent to the target;
2. at target phase: currently being dispatched from the target;
3. bubbling phase: from the target to the top parent.
immediatePropagationStopped
Whether a handler has called the Event.stopImmediatePropagation() method.
(This event is not exported to games.)
<static>
createjs.Event.KeyCodes
Key codes for common characters.
propagationStopped
Whether a handler has called the Event.prototype.stopPropagation() method or
the Event.prototype.stopImmediatePropagation() method. (This event is not
exported to games.)
removed
Whether a handler has called the Event.prototype.remove() method. (This event
is not exported to games.)
timeStamp
The epoch time at which this event was created.
(This event is not exported to games.)
type
The type of this event.
Method Detail
resetProperties()
Resets the properties used by event targets. To reduce the number of new
createjs.Event() calls, some event listeners (in this library) use object
spools. This method is used by such event dispatchers to clean up an used
event.
setProperties(target, phase)
Sets properties used by event targets.
- Parameters:
- {createjs.Event.Target} target
- {number} phase
stopImmediatePropagation()
Stops the immediate event propagation.
<static>
createjs.Event.Target()
An interface that adds event listeners or removes them. (This interface is
for removing a cycling dependency.)