Difference between revisions of "Sprite"
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | <!-- GIDEROSOBJ:Sprite --> | ||
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> | '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> | ||
'''<translate>Available since</translate>:''' Gideros 2011.6<br/> | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | ||
Line 14: | Line 15: | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== <translate>Methods</translate> === | === <translate>Methods</translate> === | ||
− | [[Special:MyLanguage/Sprite.new|Sprite.new]] ''<translate>creates a new Sprite object</translate>''<br/> | + | [[Special:MyLanguage/Sprite.new|Sprite.new]] ''<translate>creates a new Sprite object</translate>''<br/><!-- GIDEROSMTD:Sprite.new --> |
− | [[Special:MyLanguage/Sprite:addChild|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/><!-- GIDEROSMTD:Sprite:addChild --> |
− | [[Special:MyLanguage/Sprite:addChildAt|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/><!-- GIDEROSMTD:Sprite:addChildAt --> |
− | [[Special:MyLanguage/Sprite:clearBlendMode|Sprite:clearBlendMode]] ''<translate>clears the blending mode</translate>''<br/> | + | [[Special:MyLanguage/Sprite:clearBlendMode|Sprite:clearBlendMode]] ''<translate>clears the blending mode</translate>''<br/><!-- GIDEROSMTD:Sprite:clearBlendMode --> |
− | [[Special:MyLanguage/Sprite:contains|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/><!-- GIDEROSMTD:Sprite:contains --> |
− | [[Special:MyLanguage/Sprite:get|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/><!-- GIDEROSMTD:Sprite:get --> |
− | + | [[Special:MyLanguage/Sprite:getAlpha|Sprite:getAlpha]] ''<translate>returns the alpha transparency of this sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getAlpha --> | |
− | [[Special:MyLanguage/Sprite:getAnchorPosition|Sprite:getAnchorPosition]] ''<translate>Returns anchor position of Sprite</translate>''<br/> | + | [[Special:MyLanguage/Sprite:getAnchorPosition|Sprite:getAnchorPosition]] ''<translate>Returns anchor position of Sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getAnchorPosition --> |
− | [[Special:MyLanguage/Sprite:getBounds|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/><!-- GIDEROSMTD:Sprite:getBounds --> |
− | [[Special:MyLanguage/Sprite:getChildAt|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/><!-- GIDEROSMTD:Sprite:getChildAt --> |
− | [[Special:MyLanguage/Sprite:getChildIndex|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/><!-- GIDEROSMTD:Sprite:getChildIndex --> |
− | [[Special:MyLanguage/Sprite:getClip|Sprite:getClip]] <br/> | + | [[Special:MyLanguage/Sprite:getClip|Sprite:getClip]] <br/><!-- GIDEROSMTD:Sprite:getClip --> |
− | [[Special:MyLanguage/Sprite:getColorTransform|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/><!-- GIDEROSMTD:Sprite:getColorTransform --> |
− | [[Special:MyLanguage/Sprite:getHeight|Sprite:getHeight]] ''<translate>returns the height</translate>''<br/> | + | [[Special:MyLanguage/Sprite:getHeight|Sprite:getHeight]] ''<translate>returns the height</translate>''<br/><!-- GIDEROSMTD:Sprite:getHeight --> |
− | [[Special:MyLanguage/Sprite:getMatrix|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/><!-- GIDEROSMTD:Sprite:getMatrix --> |
− | [[Special:MyLanguage/Sprite:getNumChildren|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/><!-- GIDEROSMTD:Sprite:getNumChildren --> |
− | + | [[Special:MyLanguage/Sprite:getParent|Sprite:getParent]] ''<translate>returns the parent sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getParent --> | |
− | [[Special:MyLanguage/Sprite:getPosition|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/><!-- GIDEROSMTD:Sprite:getPosition --> |
− | [[Special:MyLanguage/Sprite:getRotation|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/><!-- GIDEROSMTD:Sprite:getRotation --> |
− | [[Special:MyLanguage/Sprite:getRotationX|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/><!-- GIDEROSMTD:Sprite:getRotationX --> |
− | [[Special:MyLanguage/Sprite:getRotationY|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/><!-- GIDEROSMTD:Sprite:getRotationY --> |
− | [[Special:MyLanguage/Sprite:getScale|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/><!-- GIDEROSMTD:Sprite:getScale --> |
− | [[Special:MyLanguage/Sprite:getScaleX|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/><!-- GIDEROSMTD:Sprite:getScaleX --> |
− | [[Special:MyLanguage/Sprite:getScaleY|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/><!-- GIDEROSMTD:Sprite:getScaleY --> |
− | [[Special:MyLanguage/Sprite:getScaleZ|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/><!-- GIDEROSMTD:Sprite:getScaleZ --> |
− | [[Special:MyLanguage/Sprite:getSkew|Sprite:getSkew]] <br/> | + | [[Special:MyLanguage/Sprite:getSkew|Sprite:getSkew]] <br/><!-- GIDEROSMTD:Sprite:getSkew --> |
− | + | [[Special:MyLanguage/Sprite:getSkewX|Sprite:getSkewX]] <br/><!-- GIDEROSMTD:Sprite:getSkewX --> | |
− | [[Special:MyLanguage/Sprite:getSkewY|Sprite:getSkewY]] <br/> | + | [[Special:MyLanguage/Sprite:getSkewY|Sprite:getSkewY]] <br/><!-- GIDEROSMTD:Sprite:getSkewY --> |
− | [[Special:MyLanguage/Sprite:getWidth|Sprite:getWidth]] ''<translate>returns the width</translate>''<br/> | + | [[Special:MyLanguage/Sprite:getWidth|Sprite:getWidth]] ''<translate>returns the width</translate>''<br/><!-- GIDEROSMTD:Sprite:getWidth --> |
− | [[Special:MyLanguage/Sprite:getX|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/><!-- GIDEROSMTD:Sprite:getX --> |
− | [[Special:MyLanguage/Sprite:getY|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/><!-- GIDEROSMTD:Sprite:getY --> |
− | [[Special:MyLanguage/Sprite:getZ|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/><!-- GIDEROSMTD:Sprite:getZ --> |
− | [[Special:MyLanguage/Sprite:globalToLocal|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/><!-- GIDEROSMTD:Sprite:globalToLocal --> |
− | [[Special:MyLanguage/Sprite:hitTestPoint|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/><!-- GIDEROSMTD:Sprite:hitTestPoint --> |
− | [[Special:MyLanguage/Sprite:isVisible|Sprite:isVisible]] ''<translate>returns the visibility of sprite</translate>''<br/> | + | [[Special:MyLanguage/Sprite:isVisible|Sprite:isVisible]] ''<translate>returns the visibility of sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:isVisible --> |
− | [[Special:MyLanguage/Sprite:localToGlobal|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/><!-- GIDEROSMTD:Sprite:localToGlobal --> |
− | + | [[Special:MyLanguage/Sprite:removeChild|Sprite:removeChild]] ''<translate>removes the child sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:removeChild --> | |
− | [[Special:MyLanguage/Sprite:removeChildAt|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/><!-- GIDEROSMTD:Sprite:removeChildAt --> |
− | [[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/> | + | [[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/><!-- GIDEROSMTD:Sprite:removeFromParent --> |
− | [[Special:MyLanguage/Sprite:set|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/><!-- GIDEROSMTD:Sprite:set --> |
− | [[Special:MyLanguage/Sprite:setAlpha|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/><!-- GIDEROSMTD:Sprite:setAlpha --> |
− | [[Special:MyLanguage/Sprite:setAnchorPosition|Sprite:setAnchorPosition]] ''<translate>Set anchor position</translate>''<br/> | + | [[Special:MyLanguage/Sprite:setAnchorPosition|Sprite:setAnchorPosition]] ''<translate>Set anchor position</translate>''<br/><!-- GIDEROSMTD:Sprite:setAnchorPosition --> |
− | [[Special:MyLanguage/Sprite:setBlendMode|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/><!-- GIDEROSMTD:Sprite:setBlendMode --> |
− | [[Special:MyLanguage/Sprite:setClip|Sprite:setClip]] ''<translate>Clip Sprite contents</translate>''<br/> | + | [[Special:MyLanguage/Sprite:setClip|Sprite:setClip]] ''<translate>Clip Sprite contents</translate>''<br/><!-- GIDEROSMTD:Sprite:setClip --> |
− | [[Special:MyLanguage/Sprite:setColorTransform|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/><!-- GIDEROSMTD:Sprite:setColorTransform --> |
− | [[Special:MyLanguage/Sprite:setMatrix|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/><!-- GIDEROSMTD:Sprite:setMatrix --> |
− | + | [[Special:MyLanguage/Sprite:setPosition|Sprite:setPosition]] ''<translate>sets the x,y and z coordinates of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setPosition --> | |
− | [[Special:MyLanguage/Sprite:setRotation|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/><!-- GIDEROSMTD:Sprite:setRotation --> |
− | [[Special:MyLanguage/Sprite:setRotationX|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/><!-- GIDEROSMTD:Sprite:setRotationX --> |
− | [[Special:MyLanguage/Sprite:setRotationY|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/><!-- GIDEROSMTD:Sprite:setRotationY --> |
− | [[Special:MyLanguage/Sprite:setScale|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/><!-- GIDEROSMTD:Sprite:setScale --> |
− | [[Special:MyLanguage/Sprite:setScaleX|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/><!-- GIDEROSMTD:Sprite:setScaleX --> |
− | [[Special:MyLanguage/Sprite:setScaleY|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/><!-- GIDEROSMTD:Sprite:setScaleY --> |
− | [[Special:MyLanguage/Sprite:setScaleZ|Sprite:setScaleZ]] ''<translate>Set scale on z axis</translate>''<br/> | + | [[Special:MyLanguage/Sprite:setScaleZ|Sprite:setScaleZ]] ''<translate>Set scale on z axis</translate>''<br/><!-- GIDEROSMTD:Sprite:setScaleZ --> |
− | [[Special:MyLanguage/Sprite:setShader|Sprite:setShader]] ''<translate>Set shader for this sprite</translate>''<br/> | + | [[Special:MyLanguage/Sprite:setShader|Sprite:setShader]] ''<translate>Set shader for this sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setShader --> |
− | [[Special:MyLanguage/Sprite:setShaderConstant|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/><!-- GIDEROSMTD:Sprite:setShaderConstant --> |
− | + | [[Special:MyLanguage/Sprite:setSkew|Sprite:setSkew]] <br/><!-- GIDEROSMTD:Sprite:setSkew --> | |
− | [[Special:MyLanguage/Sprite:setSkewX|Sprite:setSkewX]] <br/> | + | [[Special:MyLanguage/Sprite:setSkewX|Sprite:setSkewX]] <br/><!-- GIDEROSMTD:Sprite:setSkewX --> |
− | [[Special:MyLanguage/Sprite:setSkewY|Sprite:setSkewY]] <br/> | + | [[Special:MyLanguage/Sprite:setSkewY|Sprite:setSkewY]] <br/><!-- GIDEROSMTD:Sprite:setSkewY --> |
− | [[Special:MyLanguage/Sprite:setStencilOperation|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/><!-- GIDEROSMTD:Sprite:setStencilOperation --> |
− | [[Special:MyLanguage/Sprite:setVisible|Sprite:setVisible]] ''<translate>sets the visibility of sprite</translate>''<br/> | + | [[Special:MyLanguage/Sprite:setVisible|Sprite:setVisible]] ''<translate>sets the visibility of sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setVisible --> |
− | [[Special:MyLanguage/Sprite:setX|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/><!-- GIDEROSMTD:Sprite:setX --> |
− | [[Special:MyLanguage/Sprite:setY|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/><!-- GIDEROSMTD:Sprite:setY --> |
− | [[Special:MyLanguage/Sprite:setZ|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/><!-- GIDEROSMTD:Sprite:setZ --> |
− | [[Special:MyLanguage/Sprite:swapChildren|Sprite:swapChildren]] ''<translate>Swap two children index places</translate>''<br/> | + | [[Special:MyLanguage/Sprite:swapChildren|Sprite:swapChildren]] ''<translate>Swap two children index places</translate>''<br/><!-- GIDEROSMTD:Sprite:swapChildren --> |
− | [[Special:MyLanguage/Sprite:swapChildrenAt|Sprite:swapChildrenAt]] ''<translate>Swaps two child sprites.</translate>''<br/> | + | [[Special:MyLanguage/Sprite:swapChildrenAt|Sprite:swapChildrenAt]] ''<translate>Swaps two child sprites.</translate>''<br/><!-- GIDEROSMTD:Sprite:swapChildrenAt --> |
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== <translate>Events</translate> === | === <translate>Events</translate> === | ||
− | [[Special:MyLanguage/Event.ADDED_TO_STAGE|Event.ADDED_TO_STAGE]]<br/> | + | [[Special:MyLanguage/Event.ADDED_TO_STAGE|Event.ADDED_TO_STAGE]]<br/><!-- GIDEROSEVT:Event.ADDED_TO_STAGE --> |
− | [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]]<br/> | + | [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]]<br/><!-- GIDEROSEVT:Event.ENTER_FRAME --> |
− | [[Special:MyLanguage/Event.KEY_DOWN|Event.KEY_DOWN]]<br/> | + | [[Special:MyLanguage/Event.KEY_DOWN|Event.KEY_DOWN]]<br/><!-- GIDEROSEVT:Event.KEY_DOWN --> |
− | [[Special:MyLanguage/Event.KEY_UP|Event.KEY_UP]]<br/> | + | [[Special:MyLanguage/Event.KEY_UP|Event.KEY_UP]]<br/><!-- GIDEROSEVT:Event.KEY_UP --> |
− | [[Special:MyLanguage/Event.LAYOUT_RESIZED|Event.LAYOUT_RESIZED]]<br/> | + | [[Special:MyLanguage/Event.LAYOUT_RESIZED|Event.LAYOUT_RESIZED]]<br/><!-- GIDEROSEVT:Event.LAYOUT_RESIZED --> |
− | [[Special:MyLanguage/Event.MOUSE_DOWN|Event.MOUSE_DOWN]]<br/> | + | [[Special:MyLanguage/Event.MOUSE_DOWN|Event.MOUSE_DOWN]]<br/><!-- GIDEROSEVT:Event.MOUSE_DOWN --> |
− | [[Special:MyLanguage/Event.MOUSE_HOVER|Event.MOUSE_HOVER]]<br/> | + | [[Special:MyLanguage/Event.MOUSE_HOVER|Event.MOUSE_HOVER]]<br/><!-- GIDEROSEVT:Event.MOUSE_HOVER --> |
− | [[Special:MyLanguage/Event.MOUSE_MOVE|Event.MOUSE_MOVE]]<br/> | + | [[Special:MyLanguage/Event.MOUSE_MOVE|Event.MOUSE_MOVE]]<br/><!-- GIDEROSEVT:Event.MOUSE_MOVE --> |
− | [[Special:MyLanguage/Event.MOUSE_UP|Event.MOUSE_UP]]<br/> | + | [[Special:MyLanguage/Event.MOUSE_UP|Event.MOUSE_UP]]<br/><!-- GIDEROSEVT:Event.MOUSE_UP --> |
− | [[Special:MyLanguage/Event.MOUSE_WHEEL|Event.MOUSE_WHEEL]]<br/> | + | [[Special:MyLanguage/Event.MOUSE_WHEEL|Event.MOUSE_WHEEL]]<br/><!-- GIDEROSEVT:Event.MOUSE_WHEEL --> |
− | [[Special:MyLanguage/Event.REMOVED_FROM_STAGE|Event.REMOVED_FROM_STAGE]]<br/> | + | [[Special:MyLanguage/Event.REMOVED_FROM_STAGE|Event.REMOVED_FROM_STAGE]]<br/><!-- GIDEROSEVT:Event.REMOVED_FROM_STAGE --> |
− | [[Special:MyLanguage/Event.TOUCHES_BEGIN|Event.TOUCHES_BEGIN]]<br/> | + | [[Special:MyLanguage/Event.TOUCHES_BEGIN|Event.TOUCHES_BEGIN]]<br/><!-- GIDEROSEVT:Event.TOUCHES_BEGIN --> |
− | [[Special:MyLanguage/Event.TOUCHES_CANCEL|Event.TOUCHES_CANCEL]]<br/> | + | [[Special:MyLanguage/Event.TOUCHES_CANCEL|Event.TOUCHES_CANCEL]]<br/><!-- GIDEROSEVT:Event.TOUCHES_CANCEL --> |
− | [[Special:MyLanguage/Event.TOUCHES_END|Event.TOUCHES_END]]<br/> | + | [[Special:MyLanguage/Event.TOUCHES_END|Event.TOUCHES_END]]<br/><!-- GIDEROSEVT:Event.TOUCHES_END --> |
− | [[Special:MyLanguage/Event.TOUCHES_MOVE|Event.TOUCHES_MOVE]]<br/> | + | [[Special:MyLanguage/Event.TOUCHES_MOVE|Event.TOUCHES_MOVE]]<br/><!-- GIDEROSEVT:Event.TOUCHES_MOVE --> |
=== <translate>Constants</translate> === | === <translate>Constants</translate> === | ||
− | [[Special:MyLanguage/Sprite.ADD|Sprite.ADD]]<br/> | + | [[Special:MyLanguage/Sprite.ADD|Sprite.ADD]]<br/><!-- GIDEROSCST:Sprite.ADD --> |
− | [[Special:MyLanguage/Sprite.ALPHA|Sprite.ALPHA]]<br/> | + | [[Special:MyLanguage/Sprite.ALPHA|Sprite.ALPHA]]<br/><!-- GIDEROSCST:Sprite.ALPHA --> |
− | [[Special:MyLanguage/Sprite.MULTIPLY|Sprite.MULTIPLY]]<br/> | + | [[Special:MyLanguage/Sprite.MULTIPLY|Sprite.MULTIPLY]]<br/><!-- GIDEROSCST:Sprite.MULTIPLY --> |
− | [[Special:MyLanguage/Sprite.NO_ALPHA|Sprite.NO_ALPHA]]<br/> | + | [[Special:MyLanguage/Sprite.NO_ALPHA|Sprite.NO_ALPHA]]<br/><!-- GIDEROSCST:Sprite.NO_ALPHA --> |
− | [[Special:MyLanguage/Sprite.SCREEN|Sprite.SCREEN]]<br/> | + | [[Special:MyLanguage/Sprite.SCREEN|Sprite.SCREEN]]<br/><!-- GIDEROSCST:Sprite.SCREEN --> |
|} | |} |
Revision as of 14:56, 31 August 2018
Supported platforms:
Available since: Gideros 2011.6
Inherits from: EventDispatcher
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.
MethodsSprite.new creates a new Sprite object |
EventsEvent.ADDED_TO_STAGE ConstantsSprite.ADD |