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.ACCEPT
Event issued when positive button in enchant.widget.Confirm is pushed.
|
<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.CANCEL
Event issued when negative button in enchant.widget.Confirm is pushed.
|
<static> |
enchant.Event.CHANGE
Event issued when form object content is changed.
|
<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.COMPLETE_MEMORY_REQUEST
ゲームメモリーリクエストが成功した時に発生するイベント.
|
<static> |
enchant.Event.COMPLETE_UPDATE
ゲームメモリーのアップデートが完了したときに発生するイベント.
|
<static> |
enchant.Event.COMPLETE_XHR_REQUEST
XHRのreadyStateが4になった時に発生するイベント.
|
<static> |
enchant.Event.CONTENT_REQUESTED
Event which will be dispatched when additional content should be loaded for a view.
|
<static> |
enchant.Event.CORE_RESIZE
An event dispatched when the display size is changed.
|
<static> |
enchant.Event.DOUBLETAP
Event issued when double tap is detected.
|
<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.DRAG
Event issued when drag is detected.
|
<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.ERROR_MEMORY_REQUEST
ゲームメモリーリクエストのレスポンスがエラーの時に発生するイベント.
|
<static> |
enchant.Event.ERROR_XHR_REQUEST
XHRのレスポンスがエラーの時に発生するイベント.
|
<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.FLING
Event issued when fling is detected.
|
<static> |
enchant.Event.HOLD
Event issued when hold is detected.
|
<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.INTERACTIVE_XHR_REQUEST
XHRのreadyDtateが3になった時に発生するイベント.
|
<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.
|
<static> |
enchant.Event.LOADED_XHR_REQUEST
XHRのreadyStateが2になった時に発生するイベント.
|
<static> |
enchant.Event.LOADING_XHR_REQUEST
XHRのreadyStateが1になった時に発生するイベント.
|
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.RELEASE
Event issued when release is detected.
|
<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.
|
<static> |
enchant.Event.SLIP
Event issued when slip is detected.
|
<static> |
enchant.Event.TAP
Event issued when tap is detected.
|
The target of the event.
|
|
<static> |
enchant.Event.TELEPATHY
Event which gives foreign message to objects.
|
<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.
|
<static> |
enchant.Event.TRANSITIONENTER
Events occurring during Scene beginning.
|
<static> |
enchant.Event.TRANSITIONEXIT
Events occurring during Scene end.
|
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>
enchant.Event.ACCEPT
Event issued when positive button in enchant.widget.Confirm is pushed.
Defined in: widget.enchant.js.
Defined in: widget.enchant.js.
<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>
enchant.Event.CANCEL
Event issued when negative button in enchant.widget.Confirm is pushed.
Defined in: widget.enchant.js.
Defined in: widget.enchant.js.
<static>
enchant.Event.CHANGE
Event issued when form object content is changed.
Defined in: widget.enchant.js.
Defined in: widget.enchant.js.
<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>
enchant.Event.COMPLETE_MEMORY_REQUEST
ゲームメモリーリクエストが成功した時に発生するイベント.
発行するオブジェクト: enchant.Core, enchant.Scene,
Defined in: memory.enchant.js.
Defined in: memory.enchant.js.
<static>
enchant.Event.COMPLETE_UPDATE
ゲームメモリーのアップデートが完了したときに発生するイベント.
発行するオブジェクト: enchant.Core, enchant.Scene,
Defined in: memory.enchant.js.
Defined in: memory.enchant.js.
<static>
enchant.Event.COMPLETE_XHR_REQUEST
XHRのreadyStateが4になった時に発生するイベント.
発行するオブジェクト: enchant.Core, enchant.Scene, enchant.nineleap.memory.MemoryWrite,
Defined in: memory.enchant.js.
Defined in: memory.enchant.js.
<static>
enchant.Event.CONTENT_REQUESTED
Event which will be dispatched when additional content should be loaded for a view.
Defined in: widget.enchant.js.
Defined in: widget.enchant.js.
<static>
{String}
enchant.Event.CORE_RESIZE
An event dispatched when the display size is changed.
Issued by: enchant.Core, enchant.Scene
<static>
enchant.Event.DOUBLETAP
Event issued when double tap is detected.
Detected when two taps are detected within a set time and distance.
Defined in: widget.enchant.js.
Defined in: widget.enchant.js.
<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>
enchant.Event.DRAG
Event issued when drag is detected.
Detected when touch position changes during hold.
Defined in: widget.enchant.js.
Defined in: widget.enchant.js.
<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>
enchant.Event.ERROR_MEMORY_REQUEST
ゲームメモリーリクエストのレスポンスがエラーの時に発生するイベント.
発行するオブジェクト: enchant.Core, enchant.Scene,
Defined in: memory.enchant.js.
Defined in: memory.enchant.js.
<static>
enchant.Event.ERROR_XHR_REQUEST
XHRのレスポンスがエラーの時に発生するイベント.
発行するオブジェクト: enchant.Core, enchant.Scene, enchant.nineleap.memory.MemoryWrite,
Defined in: memory.enchant.js.
Defined in: memory.enchant.js.
<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>
enchant.Event.FLING
Event issued when fling is detected.
Detected when touch ends and position moves faster than set speed.
Defined in: widget.enchant.js.
Defined in: widget.enchant.js.
<static>
enchant.Event.HOLD
Event issued when hold is detected.
Detected when touch continues for a set time without movement.
Defined in: widget.enchant.js.
Defined in: widget.enchant.js.
<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>
enchant.Event.INTERACTIVE_XHR_REQUEST
XHRのreadyDtateが3になった時に発生するイベント.
発行するオブジェクト: enchant.Core, enchant.Scene, enchant.nineleap.memory.MemoryWrite,
Defined in: memory.enchant.js.
Defined in: memory.enchant.js.
<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();
<static>
enchant.Event.LOADED_XHR_REQUEST
XHRのreadyStateが2になった時に発生するイベント.
発行するオブジェクト: enchant.Core, enchant.Scene, enchant.nineleap.memory.MemoryWrite,
Defined in: memory.enchant.js.
Defined in: memory.enchant.js.
<static>
enchant.Event.LOADING_XHR_REQUEST
XHRのreadyStateが1になった時に発生するイベント.
発行するオブジェクト: enchant.Core, enchant.Scene, enchant.nineleap.memory.MemoryWrite,
Defined in: memory.enchant.js.
Defined in: memory.enchant.js.
{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>
enchant.Event.RELEASE
Event issued when release is detected.
Detected when touch ends during hold.
Defined in: widget.enchant.js.
Defined in: widget.enchant.js.
<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
<static>
enchant.Event.SLIP
Event issued when slip is detected.
Detected when touch position changes without holding.
Defined in: widget.enchant.js.
Defined in: widget.enchant.js.
<static>
enchant.Event.TAP
Event issued when tap is detected.
Detected when touch ends without movement, and when double touch has ended.
Defined in: widget.enchant.js.
Defined in: widget.enchant.js.
{*}
target
The target of the event.
<static>
{String}
enchant.Event.TELEPATHY
Event which gives foreign message to objects.
Issued by enchant.telepathy.TelepathySence
Defined in: telepathy.enchant.js.
Defined in: telepathy.enchant.js.
<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
<static>
enchant.Event.TRANSITIONENTER
Events occurring during Scene beginning.
Issued when ended enchant.Core#transitionPush animation.
Defined in: widget.enchant.js.
Defined in: widget.enchant.js.
<static>
enchant.Event.TRANSITIONEXIT
Events occurring during Scene end.
Issued when ended enchant.Core#transitionPop animation.
Defined in: widget.enchant.js.
Defined in: widget.enchant.js.
{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.