Class enchant.Node
Base class for objects in the display tree which is rooted at a Scene. Not to be used directly.
- Defined in: enchant.js
- Extends enchant.EventTarget
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
The age (frames) of this node which will be increased before this node receives enchant.Event.ENTER_FRAME event.
|
|
Parent Node of this Node.
|
|
Scene to which Node belongs.
|
|
x coordinates of the Node.
|
|
y coordinates of the Node.
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
moveBy(x, y)
Move the Node relative to its current position.
|
|
moveTo(x, y)
Move the Node to the given target location.
|
- Methods borrowed from class enchant.EventTarget:
- addEventListener
- clearEventListener
- dispatchEvent
- on
- removeEventListener
Class Detail
enchant.Node()
Field Detail
{Number}
age
The age (frames) of this node which will be increased before this node receives enchant.Event.ENTER_FRAME event.
{enchant.Group}
parentNode
Parent Node of this Node.
{enchant.Scene}
scene
Scene to which Node belongs.
{Number}
x
x coordinates of the Node.
{Number}
y
y coordinates of the Node.
Method Detail
-
moveBy(x, y)Move the Node relative to its current position.
- Parameters:
- {Number} x
- x axis movement distance.
- {Number} y
- y axis movement distance.
-
moveTo(x, y)Move the Node to the given target location.
- Parameters:
- {Number} x
- Target x coordinates.
- {Number} y
- Target y coordinates.