Class enchant.Event
A class for an independent implementation of events similar to DOM Events. Does not include phase concepts.
- Defined in: enchant.js
Constructor Attributes | Constructor Name and Description |
---|---|
enchant.Event(type)
|
Field Attributes | Field Name and Description |
---|---|
<static> |
enchant.Event.A_BUTTON_DOWN
An event dispatched when the 'a' button is pressed.
|
<static> |
enchant.Event.A_BUTTON_UP
An event dispatched when the 'a' button is released.
|
<static> |
enchant.Event.ACTION_ADDED
An event dispatched to the Timeline when an Action is added.
|
<static> |
enchant.Event.ACTION_END
An event dispatched when an Action finishes.
|
<static> |
enchant.Event.ACTION_REMOVED
An event dispatched to the Timeline when an Action is removed.
|
<static> |
enchant.Event.ACTION_START
An event dispatched when an Action begins.
|
<static> |
enchant.Event.ACTION_TICK
An event dispatched when an Action has gone through one frame.
|
<static> |
enchant.Event.ADDED
An event dispatched when a Node is added to a Group.
|
<static> |
enchant.Event.ADDED_TO_SCENE
An event dispatched when a Node is added to a Scene.
|
<static> |
enchant.Event.ADDED_TO_TIMELINE
An event dispatched when an Action is added to a Timeline.
|
<static> |
enchant.Event.ANIMATION_END
An event dispatched when an animation finishes, meaning null element was encountered
Issued by: enchant.Sprite
|
<static> |
enchant.Event.B_BUTTON_DOWN
An event dispatched when the 'b' button is pressed.
|
<static> |
enchant.Event.B_BUTTON_UP
An event dispatched when the 'b' button is released.
|
<static> |
enchant.Event.CHILD_ADDED
An event dispatched when a Child is added to a Node.
|
<static> |
enchant.Event.CHILD_REMOVED
An event dispatched when a Child is removed from a Node.
|
<static> |
enchant.Event.CORE_RESIZE
An event dispatched when the display size is changed.
|
<static> |
enchant.Event.DOWN_BUTTON_DOWN
An event dispatched when the 'down' button is pressed.
|
<static> |
enchant.Event.DOWN_BUTTON_UP
An event dispatched when the 'down' button is released.
|
<static> |
enchant.Event.ENTER
An event dispatched when a Scene begins.
|
<static> |
enchant.Event.ENTER_FRAME
An event which is occurring when a new frame is beeing processed.
|
<static> |
enchant.Event.ERROR
An event dispatched when an error occurs.
|
<static> |
enchant.Event.EXIT
An event dispatched when a Scene ends.
|
<static> |
enchant.Event.EXIT_FRAME
An event dispatched at the end of processing a new frame.
|
<static> |
enchant.Event.INPUT_CHANGE
An event dispatched when button inputs change.
|
<static> |
enchant.Event.INPUT_END
An event dispatched when button input ends.
|
<static> |
enchant.Event.INPUT_START
An event dispatched when a button is pressed.
|
<static> |
enchant.Event.INPUT_STATE_CHANGED
An internal event which is occurring when a input changes.
|
<static> |
enchant.Event.LEFT_BUTTON_DOWN
An event dispatched when the 'left' button is pressed.
|
<static> |
enchant.Event.LEFT_BUTTON_UP
An event dispatched when the 'left' button is released.
|
<static> |
enchant.Event.LOAD
An event dispatched once the core has finished loading.
|
The x-coordinate of the event's occurrence relative to the object
which issued the event.
|
|
The y-coordinate of the event's occurrence relative to the object
which issued the event.
|
|
<static> |
enchant.Event.PROGRESS
An event dispatched while the core is loading.
|
<static> |
enchant.Event.REMOVED
An event dispatched when a Node is deleted from a Group.
|
<static> |
enchant.Event.REMOVED_FROM_SCENE
An event dispatched when a Node is deleted from a Scene.
|
<static> |
enchant.Event.REMOVED_FROM_TIMELINE
An event dispatched when an Action is removed from a Timeline.
|
<static> |
enchant.Event.RENDER
An event dispatched when an Entity is rendered.
|
<static> |
enchant.Event.RIGHT_BUTTON_DOWN
An event dispatched when the 'right' button is pressed.
|
<static> |
enchant.Event.RIGHT_BUTTON_UP
An event dispatched when the 'right' button is released.
|
The target of the event.
|
|
<static> |
enchant.Event.TOUCH_END
An event dispatched when a touch event intersecting the Node ends.
|
<static> |
enchant.Event.TOUCH_MOVE
An event dispatched when a touch event intersecting the Node has been moved.
|
<static> |
enchant.Event.TOUCH_START
An event dispatched when a touch event intersecting a Node begins.
|
The type of the event.
|
|
<static> |
enchant.Event.UP_BUTTON_DOWN
An event dispatched when the 'up' button is pressed.
|
<static> |
enchant.Event.UP_BUTTON_UP
An event dispatched when the 'up' button is released.
|
The x-coordinate of the event's occurrence.
|
|
The y-coordinate of the event's occurrence.
|
Class Detail
enchant.Event(type)
- Parameters:
- {String} type
- Event type.
Field Detail
<static>
{String}
enchant.Event.A_BUTTON_DOWN
An event dispatched when the 'a' button is pressed.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.A_BUTTON_UP
An event dispatched when the 'a' button is released.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.ACTION_ADDED
An event dispatched to the Timeline when an Action is added.
<static>
{String}
enchant.Event.ACTION_END
An event dispatched when an Action finishes.
<static>
{String}
enchant.Event.ACTION_REMOVED
An event dispatched to the Timeline when an Action is removed.
<static>
{String}
enchant.Event.ACTION_START
An event dispatched when an Action begins.
<static>
{String}
enchant.Event.ACTION_TICK
An event dispatched when an Action has gone through one frame.
<static>
{String}
enchant.Event.ADDED
An event dispatched when a Node is added to a Group.
Issued by: enchant.Node
<static>
{String}
enchant.Event.ADDED_TO_SCENE
An event dispatched when a Node is added to a Scene.
Issued by: enchant.Node
<static>
{String}
enchant.Event.ADDED_TO_TIMELINE
An event dispatched when an Action is added to a Timeline.
When looped, an Action is removed from the Timeline and added back into it.
<static>
{String}
enchant.Event.ANIMATION_END
An event dispatched when an animation finishes, meaning null element was encountered
Issued by: enchant.Sprite
<static>
{String}
enchant.Event.B_BUTTON_DOWN
An event dispatched when the 'b' button is pressed.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.B_BUTTON_UP
An event dispatched when the 'b' button is released.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.CHILD_ADDED
An event dispatched when a Child is added to a Node.
Issued by: enchant.Group, enchant.Scene
<static>
{String}
enchant.Event.CHILD_REMOVED
An event dispatched when a Child is removed from a Node.
Issued by: enchant.Group, enchant.Scene
<static>
{String}
enchant.Event.CORE_RESIZE
An event dispatched when the display size is changed.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.DOWN_BUTTON_DOWN
An event dispatched when the 'down' button is pressed.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.DOWN_BUTTON_UP
An event dispatched when the 'down' button is released.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.ENTER
An event dispatched when a Scene begins.
Issued by: enchant.Scene
<static>
{String}
enchant.Event.ENTER_FRAME
An event which is occurring when a new frame is beeing processed.
Issued object: enchant.Core, enchant.Node
<static>
enchant.Event.ERROR
An event dispatched when an error occurs.
Issued by: enchant.Core, enchant.Surface, enchant.WebAudioSound, enchant.DOMSound
<static>
{String}
enchant.Event.EXIT
An event dispatched when a Scene ends.
Issued by: enchant.Scene
<static>
{String}
enchant.Event.EXIT_FRAME
An event dispatched at the end of processing a new frame.
Issued by: enchant.Core, enchant.Node
<static>
{String}
enchant.Event.INPUT_CHANGE
An event dispatched when button inputs change.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.INPUT_END
An event dispatched when button input ends.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.INPUT_START
An event dispatched when a button is pressed.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.INPUT_STATE_CHANGED
An internal event which is occurring when a input changes.
Issued object: enchant.InputSource
<static>
{String}
enchant.Event.LEFT_BUTTON_DOWN
An event dispatched when the 'left' button is pressed.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.LEFT_BUTTON_UP
An event dispatched when the 'left' button is released.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.LOAD
An event dispatched once the core has finished loading.
When preloading images, it is necessary to wait until preloading is complete
before starting the game.
Issued by: enchant.Core
var core = new Core(320, 320); core.preload('player.gif'); core.onload = function() { ... // Describes initial core processing }; core.start();
{Number}
localX
The x-coordinate of the event's occurrence relative to the object
which issued the event.
{Number}
localY
The y-coordinate of the event's occurrence relative to the object
which issued the event.
<static>
{String}
enchant.Event.PROGRESS
An event dispatched while the core is loading.
Dispatched each time an image is preloaded.
Issued by: enchant.LoadingScene
<static>
{String}
enchant.Event.REMOVED
An event dispatched when a Node is deleted from a Group.
Issued by: enchant.Node
<static>
{String}
enchant.Event.REMOVED_FROM_SCENE
An event dispatched when a Node is deleted from a Scene.
Issued by: enchant.Node
<static>
{String}
enchant.Event.REMOVED_FROM_TIMELINE
An event dispatched when an Action is removed from a Timeline.
When looped, an Action is removed from the timeline and added back into it.
<static>
{String}
enchant.Event.RENDER
An event dispatched when an Entity is rendered.
Issued by: enchant.Entity
<static>
{String}
enchant.Event.RIGHT_BUTTON_DOWN
An event dispatched when the 'right' button is pressed.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.RIGHT_BUTTON_UP
An event dispatched when the 'right' button is released.
Issued by: enchant.Core, enchant.Scene
{*}
target
The target of the event.
<static>
{String}
enchant.Event.TOUCH_END
An event dispatched when a touch event intersecting the Node ends.
A mouse event counts as a touch event. Issued by: enchant.Node
<static>
{String}
enchant.Event.TOUCH_MOVE
An event dispatched when a touch event intersecting the Node has been moved.
A mouse event counts as a touch event. Issued by: enchant.Node
<static>
{String}
enchant.Event.TOUCH_START
An event dispatched when a touch event intersecting a Node begins.
A mouse event counts as a touch event. Issued by: enchant.Node
{String}
type
The type of the event.
<static>
{String}
enchant.Event.UP_BUTTON_DOWN
An event dispatched when the 'up' button is pressed.
Issued by: enchant.Core, enchant.Scene
<static>
{String}
enchant.Event.UP_BUTTON_UP
An event dispatched when the 'up' button is released.
Issued by: enchant.Core, enchant.Scene
{Number}
x
The x-coordinate of the event's occurrence.
{Number}
y
The y-coordinate of the event's occurrence.