Difference between revisions of "Sprite"

From GiderosMobile
Line 4: Line 4:
 
=== Description ===
 
=== Description ===
 
<translate><br />
 
<translate><br />
The [[Sprite]] class is the base class for all objects that can be placed on the scene tree. It is the basic scene tree building block.<br />
+
The [[Special:MyLanguage/Sprite|Sprite]] class is the base class for all objects that can be placed on the scene tree. It is the basic scene tree building block.<br />
 
A sprite can contain child sprites which makes the scene tree hierarchy.
 
A sprite can contain child sprites which makes the scene tree hierarchy.
 
Transformations such as translation, rotation, scaling and color transforms propogates its effect to all of its children.<br />
 
Transformations such as translation, rotation, scaling and color transforms propogates its effect to all of its children.<br />
 
The drawing order is defined by the order of children. First child is drawn first and last child is drawn last. It is possible to change the drawing order by modifying the order of child list.<br />
 
The drawing order is defined by the order of children. First child is drawn first and last child is drawn last. It is possible to change the drawing order by modifying the order of child list.<br />
A [[Sprite]] instance can exists without attaching the scene tree.<br />
+
A [[Special:MyLanguage/Sprite|Sprite]] instance can exists without attaching the scene tree.<br />
An unattached sprite can receive [[Event.ENTER_FRAME]] event but it will only receive mouse and touch events when it is attached to the scene tree.<br /></translate>
+
An unattached sprite can receive [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]] event but it will only receive mouse and touch events when it is attached to the scene tree.<br /></translate>
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== Methods ===
 
=== Methods ===
[[Sprite.new]] ''<translate>creates a new Sprite object</translate>''<br/>
+
[[Special:MyLanguage/Sprite.new|Sprite.new]] ''<translate>creates a new Sprite object</translate>''<br/>
[[Sprite:addChild]] ''<translate>adds a sprite as a child</translate>''<br/>
+
[[Special:MyLanguage/Sprite:addChild|Sprite:addChild]] ''<translate>adds a sprite as a child</translate>''<br/>
[[Sprite:addChildAt]] ''<translate>add a sprite as a child at the index position specified</translate>''<br/>
+
[[Special:MyLanguage/Sprite:addChildAt|Sprite:addChildAt]] ''<translate>add a sprite as a child at the index position specified</translate>''<br/>
[[Sprite:clearBlendMode]] ''<translate>clears the blending mode</translate>''<br/>
+
[[Special:MyLanguage/Sprite:clearBlendMode|Sprite:clearBlendMode]] ''<translate>clears the blending mode</translate>''<br/>
[[Sprite:contains]] ''<translate>determines whether the specified sprite is contained in the subtree of this sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:contains|Sprite:contains]] ''<translate>determines whether the specified sprite is contained in the subtree of this sprite</translate>''<br/>
[[Sprite:get]] ''<translate>gets the specified property by its name</translate>''<br/>
+
[[Special:MyLanguage/Sprite:get|Sprite:get]] ''<translate>gets the specified property by its name</translate>''<br/>
[[Sprite:getAlpha]] ''<translate>returns the alpha transparency of this sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getAlpha|Sprite:getAlpha]] ''<translate>returns the alpha transparency of this sprite</translate>''<br/>
[[Sprite:getAnchorPosition]] ''<translate>Returns anchor position of Sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getAnchorPosition|Sprite:getAnchorPosition]] ''<translate>Returns anchor position of Sprite</translate>''<br/>
[[Sprite:getBounds]] ''<translate>returns the bounds as it appears in another sprite's coordinate system</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getBounds|Sprite:getBounds]] ''<translate>returns the bounds as it appears in another sprite's coordinate system</translate>''<br/>
[[Sprite:getChildAt]] ''<translate>returns the child sprite that exists at the specified index</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getChildAt|Sprite:getChildAt]] ''<translate>returns the child sprite that exists at the specified index</translate>''<br/>
[[Sprite:getChildIndex]] ''<translate>returns the index of the specified child sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getChildIndex|Sprite:getChildIndex]] ''<translate>returns the index of the specified child sprite</translate>''<br/>
[[Sprite:getClip]] <br/>
+
[[Special:MyLanguage/Sprite:getClip|Sprite:getClip]] <br/>
[[Sprite:getColorTransform]] ''<translate>returns the red, green, blue and alpha channel multipliers</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getColorTransform|Sprite:getColorTransform]] ''<translate>returns the red, green, blue and alpha channel multipliers</translate>''<br/>
[[Sprite:getHeight]] ''<translate>returns the height</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getHeight|Sprite:getHeight]] ''<translate>returns the height</translate>''<br/>
[[Sprite:getMatrix]] ''<translate>returns the transformation matrix of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getMatrix|Sprite:getMatrix]] ''<translate>returns the transformation matrix of the sprite</translate>''<br/>
[[Sprite:getNumChildren]] ''<translate>returns the number of children of this sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getNumChildren|Sprite:getNumChildren]] ''<translate>returns the number of children of this sprite</translate>''<br/>
[[Sprite:getParent]] ''<translate>returns the parent sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getParent|Sprite:getParent]] ''<translate>returns the parent sprite</translate>''<br/>
[[Sprite:getPosition]] ''<translate>gets the x,y and z coordinates of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getPosition|Sprite:getPosition]] ''<translate>gets the x,y and z coordinates of the sprite</translate>''<br/>
[[Sprite:getRotation]] ''<translate>returns the rotation of the sprite in degrees</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getRotation|Sprite:getRotation]] ''<translate>returns the rotation of the sprite in degrees</translate>''<br/>
[[Sprite:getRotationX]] ''<translate>returns the rotation of the sprite around x axis in degrees</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getRotationX|Sprite:getRotationX]] ''<translate>returns the rotation of the sprite around x axis in degrees</translate>''<br/>
[[Sprite:getRotationY]] ''<translate>returns the rotation of the sprite around y axis in degrees</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getRotationY|Sprite:getRotationY]] ''<translate>returns the rotation of the sprite around y axis in degrees</translate>''<br/>
[[Sprite:getScale]] ''<translate>returns the horizontal, vertical and z scales of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getScale|Sprite:getScale]] ''<translate>returns the horizontal, vertical and z scales of the sprite</translate>''<br/>
[[Sprite:getScaleX]] ''<translate>returns the horizontal scale of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getScaleX|Sprite:getScaleX]] ''<translate>returns the horizontal scale of the sprite</translate>''<br/>
[[Sprite:getScaleY]] ''<translate>returns the vertical scale of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getScaleY|Sprite:getScaleY]] ''<translate>returns the vertical scale of the sprite</translate>''<br/>
[[Sprite:getScaleZ]] ''<translate>returns the scale on z axis of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getScaleZ|Sprite:getScaleZ]] ''<translate>returns the scale on z axis of the sprite</translate>''<br/>
[[Sprite:getSkew]] <br/>
+
[[Special:MyLanguage/Sprite:getSkew|Sprite:getSkew]] <br/>
[[Sprite:getSkewX]] <br/>
+
[[Special:MyLanguage/Sprite:getSkewX|Sprite:getSkewX]] <br/>
[[Sprite:getSkewY]] <br/>
+
[[Special:MyLanguage/Sprite:getSkewY|Sprite:getSkewY]] <br/>
[[Sprite:getWidth]] ''<translate>returns the width</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getWidth|Sprite:getWidth]] ''<translate>returns the width</translate>''<br/>
[[Sprite:getX]] ''<translate>returns the x coordinate of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getX|Sprite:getX]] ''<translate>returns the x coordinate of the sprite</translate>''<br/>
[[Sprite:getY]] ''<translate>returns the y coordinate of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getY|Sprite:getY]] ''<translate>returns the y coordinate of the sprite</translate>''<br/>
[[Sprite:getZ]] ''<translate>returns the z coordinate of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:getZ|Sprite:getZ]] ''<translate>returns the z coordinate of the sprite</translate>''<br/>
[[Sprite:globalToLocal]] ''<translate>converts the x,y coordinates from the global to the sprite's (local) coordinates</translate>''<br/>
+
[[Special:MyLanguage/Sprite:globalToLocal|Sprite:globalToLocal]] ''<translate>converts the x,y coordinates from the global to the sprite's (local) coordinates</translate>''<br/>
[[Sprite:hitTestPoint]] ''<translate>checks the given coordinates is in bounds of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:hitTestPoint|Sprite:hitTestPoint]] ''<translate>checks the given coordinates is in bounds of the sprite</translate>''<br/>
[[Sprite:isVisible]] ''<translate>returns the visibility of sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:isVisible|Sprite:isVisible]] ''<translate>returns the visibility of sprite</translate>''<br/>
[[Sprite:localToGlobal]] ''<translate>converts the x,y coordinates from the sprite's (local) coordinates to the global coordinates</translate>''<br/>
+
[[Special:MyLanguage/Sprite:localToGlobal|Sprite:localToGlobal]] ''<translate>converts the x,y coordinates from the sprite's (local) coordinates to the global coordinates</translate>''<br/>
[[Sprite:removeChild]] ''<translate>removes the child sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:removeChild|Sprite:removeChild]] ''<translate>removes the child sprite</translate>''<br/>
[[Sprite:removeChildAt]] ''<translate>removes the child sprite at the specifed index</translate>''<br/>
+
[[Special:MyLanguage/Sprite:removeChildAt|Sprite:removeChildAt]] ''<translate>removes the child sprite at the specifed index</translate>''<br/>
[[Sprite:removeFromParent]] ''<translate>if the sprite has a parent, removes the sprite from the child list of its parent sprite.</translate>''<br/>
+
[[Special:MyLanguage/Sprite:removeFromParent|Sprite:removeFromParent]] ''<translate>if the sprite has a parent, removes the sprite from the child list of its parent sprite.</translate>''<br/>
[[Sprite:set]] ''<translate>sets the specified property by its name</translate>''<br/>
+
[[Special:MyLanguage/Sprite:set|Sprite:set]] ''<translate>sets the specified property by its name</translate>''<br/>
[[Sprite:setAlpha]] ''<translate>sets the alpha transparency of this sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setAlpha|Sprite:setAlpha]] ''<translate>sets the alpha transparency of this sprite</translate>''<br/>
[[Sprite:setAnchorPosition]] ''<translate>Set anchor position</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setAnchorPosition|Sprite:setAnchorPosition]] ''<translate>Set anchor position</translate>''<br/>
[[Sprite:setBlendMode]] ''<translate>sets the blend mode of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setBlendMode|Sprite:setBlendMode]] ''<translate>sets the blend mode of the sprite</translate>''<br/>
[[Sprite:setClip]] ''<translate>Clip Sprite contents</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setClip|Sprite:setClip]] ''<translate>Clip Sprite contents</translate>''<br/>
[[Sprite:setColorTransform]] ''<translate>sets the red, green, blue and alpha channel multipliers</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setColorTransform|Sprite:setColorTransform]] ''<translate>sets the red, green, blue and alpha channel multipliers</translate>''<br/>
[[Sprite:setMatrix]] ''<translate>sets the transformation matrix of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setMatrix|Sprite:setMatrix]] ''<translate>sets the transformation matrix of the sprite</translate>''<br/>
[[Sprite:setPosition]] ''<translate>sets the x,y and z coordinates of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setPosition|Sprite:setPosition]] ''<translate>sets the x,y and z coordinates of the sprite</translate>''<br/>
[[Sprite:setRotation]] ''<translate>sets the rotation of the sprite in degrees</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setRotation|Sprite:setRotation]] ''<translate>sets the rotation of the sprite in degrees</translate>''<br/>
[[Sprite:setRotationX]] ''<translate>sets the rotation of the sprite in degrees around x axis</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setRotationX|Sprite:setRotationX]] ''<translate>sets the rotation of the sprite in degrees around x axis</translate>''<br/>
[[Sprite:setRotationY]] ''<translate>sets the rotation of the sprite in degrees around y axis</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setRotationY|Sprite:setRotationY]] ''<translate>sets the rotation of the sprite in degrees around y axis</translate>''<br/>
[[Sprite:setScale]] ''<translate>sets the horizontal, vertical and z axis scales of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setScale|Sprite:setScale]] ''<translate>sets the horizontal, vertical and z axis scales of the sprite</translate>''<br/>
[[Sprite:setScaleX]] ''<translate>sets the horizontal scale of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setScaleX|Sprite:setScaleX]] ''<translate>sets the horizontal scale of the sprite</translate>''<br/>
[[Sprite:setScaleY]] ''<translate>sets the vertical scale of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setScaleY|Sprite:setScaleY]] ''<translate>sets the vertical scale of the sprite</translate>''<br/>
[[Sprite:setScaleZ]] ''<translate>Set scale on z axis</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setScaleZ|Sprite:setScaleZ]] ''<translate>Set scale on z axis</translate>''<br/>
[[Sprite:setShader]] ''<translate>Set shader for this sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setShader|Sprite:setShader]] ''<translate>Set shader for this sprite</translate>''<br/>
[[Sprite:setShaderConstant]] ''<translate>Change the value of a uniform for this sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setShaderConstant|Sprite:setShaderConstant]] ''<translate>Change the value of a uniform for this sprite</translate>''<br/>
[[Sprite:setSkew]] <br/>
+
[[Special:MyLanguage/Sprite:setSkew|Sprite:setSkew]] <br/>
[[Sprite:setSkewX]] <br/>
+
[[Special:MyLanguage/Sprite:setSkewX|Sprite:setSkewX]] <br/>
[[Sprite:setSkewY]] <br/>
+
[[Special:MyLanguage/Sprite:setSkewY|Sprite:setSkewY]] <br/>
[[Sprite:setStencilOperation]] ''<translate>Set the stencil operation for this sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setStencilOperation|Sprite:setStencilOperation]] ''<translate>Set the stencil operation for this sprite</translate>''<br/>
[[Sprite:setVisible]] ''<translate>sets the visibility of sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setVisible|Sprite:setVisible]] ''<translate>sets the visibility of sprite</translate>''<br/>
[[Sprite:setX]] ''<translate>sets the x coordinate of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setX|Sprite:setX]] ''<translate>sets the x coordinate of the sprite</translate>''<br/>
[[Sprite:setY]] ''<translate>sets the y coordinate of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setY|Sprite:setY]] ''<translate>sets the y coordinate of the sprite</translate>''<br/>
[[Sprite:setZ]] ''<translate>sets the z coordinate of the sprite</translate>''<br/>
+
[[Special:MyLanguage/Sprite:setZ|Sprite:setZ]] ''<translate>sets the z coordinate of the sprite</translate>''<br/>
[[Sprite:swapChildren]] ''<translate>Swap two children index places</translate>''<br/>
+
[[Special:MyLanguage/Sprite:swapChildren|Sprite:swapChildren]] ''<translate>Swap two children index places</translate>''<br/>
[[Sprite:swapChildrenAt]] ''<translate>Swaps two child sprites.</translate>''<br/>
+
[[Special:MyLanguage/Sprite:swapChildrenAt|Sprite:swapChildrenAt]] ''<translate>Swaps two child sprites.</translate>''<br/>
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== Events ===
 
=== Events ===
[[Event.ADDED_TO_STAGE]]<br/>
+
[[Special:MyLanguage/Event.ADDED_TO_STAGE|Event.ADDED_TO_STAGE]]<br/>
[[Event.ENTER_FRAME]]<br/>
+
[[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]]<br/>
[[Event.KEY_DOWN]]<br/>
+
[[Special:MyLanguage/Event.KEY_DOWN|Event.KEY_DOWN]]<br/>
[[Event.KEY_UP]]<br/>
+
[[Special:MyLanguage/Event.KEY_UP|Event.KEY_UP]]<br/>
[[Event.LAYOUT_RESIZED]]<br/>
+
[[Special:MyLanguage/Event.LAYOUT_RESIZED|Event.LAYOUT_RESIZED]]<br/>
[[Event.MOUSE_DOWN]]<br/>
+
[[Special:MyLanguage/Event.MOUSE_DOWN|Event.MOUSE_DOWN]]<br/>
[[Event.MOUSE_HOVER]]<br/>
+
[[Special:MyLanguage/Event.MOUSE_HOVER|Event.MOUSE_HOVER]]<br/>
[[Event.MOUSE_MOVE]]<br/>
+
[[Special:MyLanguage/Event.MOUSE_MOVE|Event.MOUSE_MOVE]]<br/>
[[Event.MOUSE_UP]]<br/>
+
[[Special:MyLanguage/Event.MOUSE_UP|Event.MOUSE_UP]]<br/>
[[Event.MOUSE_WHEEL]]<br/>
+
[[Special:MyLanguage/Event.MOUSE_WHEEL|Event.MOUSE_WHEEL]]<br/>
[[Event.REMOVED_FROM_STAGE]]<br/>
+
[[Special:MyLanguage/Event.REMOVED_FROM_STAGE|Event.REMOVED_FROM_STAGE]]<br/>
[[Event.TOUCHES_BEGIN]]<br/>
+
[[Special:MyLanguage/Event.TOUCHES_BEGIN|Event.TOUCHES_BEGIN]]<br/>
[[Event.TOUCHES_CANCEL]]<br/>
+
[[Special:MyLanguage/Event.TOUCHES_CANCEL|Event.TOUCHES_CANCEL]]<br/>
[[Event.TOUCHES_END]]<br/>
+
[[Special:MyLanguage/Event.TOUCHES_END|Event.TOUCHES_END]]<br/>
[[Event.TOUCHES_MOVE]]<br/>
+
[[Special:MyLanguage/Event.TOUCHES_MOVE|Event.TOUCHES_MOVE]]<br/>
 
=== Constants ===
 
=== Constants ===
[[Sprite.ADD]]<br/>
+
[[Special:MyLanguage/Sprite.ADD|Sprite.ADD]]<br/>
[[Sprite.ALPHA]]<br/>
+
[[Special:MyLanguage/Sprite.ALPHA|Sprite.ALPHA]]<br/>
[[Sprite.MULTIPLY]]<br/>
+
[[Special:MyLanguage/Sprite.MULTIPLY|Sprite.MULTIPLY]]<br/>
[[Sprite.NO_ALPHA]]<br/>
+
[[Special:MyLanguage/Sprite.NO_ALPHA|Sprite.NO_ALPHA]]<br/>
[[Sprite.SCREEN]]<br/>
+
[[Special:MyLanguage/Sprite.SCREEN|Sprite.SCREEN]]<br/>
 
|}
 
|}

Revision as of 16:33, 23 August 2018

Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6

Description


The Sprite class is the base class for all objects that can be placed on the scene tree. It is the basic scene tree building block.
A sprite can contain child sprites which makes the scene tree hierarchy. Transformations such as translation, rotation, scaling and color transforms propogates its effect to all of its children.
The drawing order is defined by the order of children. First child is drawn first and last child is drawn last. It is possible to change the drawing order by modifying the order of child list.
A Sprite instance can exists without attaching the scene tree.
An unattached sprite can receive Event.ENTER_FRAME event but it will only receive mouse and touch events when it is attached to the scene tree.

Methods

Sprite.new creates a new Sprite object
Sprite:addChild adds a sprite as a child
Sprite:addChildAt add a sprite as a child at the index position specified
Sprite:clearBlendMode clears the blending mode
Sprite:contains determines whether the specified sprite is contained in the subtree of this sprite
Sprite:get gets the specified property by its name
Sprite:getAlpha returns the alpha transparency of this sprite
Sprite:getAnchorPosition Returns anchor position of Sprite
Sprite:getBounds returns the bounds as it appears in another sprite's coordinate system
Sprite:getChildAt returns the child sprite that exists at the specified index
Sprite:getChildIndex returns the index of the specified child sprite
Sprite:getClip
Sprite:getColorTransform returns the red, green, blue and alpha channel multipliers
Sprite:getHeight returns the height
Sprite:getMatrix returns the transformation matrix of the sprite
Sprite:getNumChildren returns the number of children of this sprite
Sprite:getParent returns the parent sprite
Sprite:getPosition gets the x,y and z coordinates of the sprite
Sprite:getRotation returns the rotation of the sprite in degrees
Sprite:getRotationX returns the rotation of the sprite around x axis in degrees
Sprite:getRotationY returns the rotation of the sprite around y axis in degrees
Sprite:getScale returns the horizontal, vertical and z scales of the sprite
Sprite:getScaleX returns the horizontal scale of the sprite
Sprite:getScaleY returns the vertical scale of the sprite
Sprite:getScaleZ returns the scale on z axis of the sprite
Sprite:getSkew
Sprite:getSkewX
Sprite:getSkewY
Sprite:getWidth returns the width
Sprite:getX returns the x coordinate of the sprite
Sprite:getY returns the y coordinate of the sprite
Sprite:getZ returns the z coordinate of the sprite
Sprite:globalToLocal converts the x,y coordinates from the global to the sprite's (local) coordinates
Sprite:hitTestPoint checks the given coordinates is in bounds of the sprite
Sprite:isVisible returns the visibility of sprite
Sprite:localToGlobal converts the x,y coordinates from the sprite's (local) coordinates to the global coordinates
Sprite:removeChild removes the child sprite
Sprite:removeChildAt removes the child sprite at the specifed index
Sprite:removeFromParent if the sprite has a parent, removes the sprite from the child list of its parent sprite.
Sprite:set sets the specified property by its name
Sprite:setAlpha sets the alpha transparency of this sprite
Sprite:setAnchorPosition Set anchor position
Sprite:setBlendMode sets the blend mode of the sprite
Sprite:setClip Clip Sprite contents
Sprite:setColorTransform sets the red, green, blue and alpha channel multipliers
Sprite:setMatrix sets the transformation matrix of the sprite
Sprite:setPosition sets the x,y and z coordinates of the sprite
Sprite:setRotation sets the rotation of the sprite in degrees
Sprite:setRotationX sets the rotation of the sprite in degrees around x axis
Sprite:setRotationY sets the rotation of the sprite in degrees around y axis
Sprite:setScale sets the horizontal, vertical and z axis scales of the sprite
Sprite:setScaleX sets the horizontal scale of the sprite
Sprite:setScaleY sets the vertical scale of the sprite
Sprite:setScaleZ Set scale on z axis
Sprite:setShader Set shader for this sprite
Sprite:setShaderConstant Change the value of a uniform for this sprite
Sprite:setSkew
Sprite:setSkewX
Sprite:setSkewY
Sprite:setStencilOperation Set the stencil operation for this sprite
Sprite:setVisible sets the visibility of sprite
Sprite:setX sets the x coordinate of the sprite
Sprite:setY sets the y coordinate of the sprite
Sprite:setZ sets the z coordinate of the sprite
Sprite:swapChildren Swap two children index places
Sprite:swapChildrenAt Swaps two child sprites.

Events

Event.ADDED_TO_STAGE
Event.ENTER_FRAME
Event.KEY_DOWN
Event.KEY_UP
Event.LAYOUT_RESIZED
Event.MOUSE_DOWN
Event.MOUSE_HOVER
Event.MOUSE_MOVE
Event.MOUSE_UP
Event.MOUSE_WHEEL
Event.REMOVED_FROM_STAGE
Event.TOUCHES_BEGIN
Event.TOUCHES_CANCEL
Event.TOUCHES_END
Event.TOUCHES_MOVE

Constants

Sprite.ADD
Sprite.ALPHA
Sprite.MULTIPLY
Sprite.NO_ALPHA
Sprite.SCREEN