TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
CompositeSprite Class Reference

Inherits SceneObject.

## Public Member Functions
Integer | addSprite ([a][b][c][d][e][f])
void | clearSpriteAsset ()
void | clearSprites ()
void | deselectSprite ()
Boolean | getBatchCulling ()
Boolean | getBatchIsolated ()
String | getBatchLayout ()
String | getBatchSortMode ()
Float | getDefaultSpriteAngle ()
String | getDefaultSpriteSize ()
String | getDefaultSpriteStride ()
Float | getSpriteAlphaTest ()
Float | getSpriteAngle ()
String | getSpriteAnimation ()
Integer | getSpriteAnimationFrame ()
Float | getSpriteBlendAlpha ()
String | getSpriteBlendColor (allowColorNames)
Boolean | getSpriteBlendMode ()
Integer | getSpriteCount ()
String | getSpriteDataObject ()
Float | getSpriteDepth ()
String | getSpriteDstBlendFactor ()
Boolean | getSpriteFlipX ()
Boolean | getSpriteFlipY ()
Integer | getSpriteId ()
String | getSpriteImage ()
Integer | getSpriteImageFrame ()
String | getSpriteLocalPosition ()
String | getSpriteLogicalPosition ()
String | getSpriteName ()
String | getSpriteNamedImageFrame ()
String | getSpriteRenderGroup ()
String | getSpriteSize ()
String | getSpriteSortPoint ()
String | getSpriteSrcBlendFactor ()
String | getSpriteUserData ()
Boolean | getSpriteVisible ()
Boolean | isSpriteSelected ()
String | pickArea (startx/y, endx/y)
String | pickPoint (x/y)
String | pickRay (startx/y, endx/y)
Boolean | removeSprite ()
Boolean | selectSprite (a b[c][d][e][f])
Boolean | selectSpriteId (int batchId)
Boolean | selectSpriteName (name)
void | setBatchCulling (bool batchCulling)
void | setBatchIsolated (bool batchIsolated)
void | setBatchLayout (batchLayoutType)
void | setBatchSortMode (renderSortMode)
void | setDefaultSpriteAngle (float angle)
void | setDefaultSpriteSize (float width, [float height])
void | setDefaultSpriteStride (float strideX, [float strideY]])
void | setSpriteAlphaTest (float alpha)
void | setSpriteAngle (float localAngle)
void | setSpriteAnimation (animationAssetId)
void | setSpriteAnimationFrame (int animationFrame)
void | setSpriteBlendAlpha (float alpha)
void | setSpriteBlendColor (float red, float green, float blue, [float alpha=1.0])
void | setSpriteBlendMode (bool blendMode)
void | setSpriteDataObject (object)
void | setSpriteDepth (float depth)
void | setSpriteDstBlendFactor (dstBlend)
void | setSpriteFlipX (bool flipX)
void | setSpriteFlipY (bool flipY)
void | setSpriteImage (imageAssetId, [imageFrame])
void | setSpriteImageFrame (int imageFrame)
void | setSpriteLocalPosition (float localX, float localY)
void | setSpriteName (name)
void | setSpriteNamedImageFrame (namedFrame)
void | setSpriteRenderGroup (renderGroup)
void | setSpriteSize (float width, [float height])
void | setSpriteSortPoint (float localX, float localY)
void | setSpriteSrcBlendFactor (srcBlend)
void | setSpriteUserData (data)
void | setSpriteVisible (bool visible)
Public Member Functions inherited from SceneObject
void | addToScene (Scene scene)
void | applyAngularImpulse (impulse)
void | applyForce (worldForce X/Y, [worldPoint X/Y])
void | applyLinearImpulse (worldImpulse X/Y, [worldPoint X/Y])
void | applyTorque (torque)
void | attachGui (guiControl guiObject, SceneWindow window, [sizeControl?=false])
void | cancelFadeTo ()
void | cancelGrowTo ()
void | cancelMoveTo ([autoStop=true])
void | cancelRotateTo ([autoStop=true])
void | clearCollisionShapes ()
void | copyAllCollisionShapes (targetObject[, clearTargetShapes?])
Integer | copyCollisionShape (int shapeIndex, targetObject)
Boolean | copyFrom (SceneObject object, [copyDynamicFields?=false])
Integer | createChainCollisionShape (localPointsX/Y, [adjacentLocalPositionStartX, adjacentLocalPositionStartY], [adjacentLocalPositionEndX, adjacentLocalPositionEndY])
Integer | createCircleCollisionShape (radius, [localPositionX, localPositionY])
Integer | createEdgeCollisionShape (localPositionStartX, localPositionStartY, localPositionEndX, localPositionEndY, [adjacentLocalPositionStartX, adjacentLocalPositionStartY], [adjacentLocalPositionEndX, adjacentLocalPositionEndY])
Integer | createPolygonBoxCollisionShape (width, height, [localCentroidX, localCentroidY], [angle])
Integer | createPolygonCollisionShape (localPointsX/Y)
Boolean | deleteCollisionShape (int shapeIndex)
void | detachGui ()
Boolean | fadeTo (targetColor red/green/blue/alpha, rate)
Boolean | fadeToTime (targetColor red/green/blue/alpha, time)
String | getAABB ()
Boolean | getActive ()
Float | getAlphaTest ()
Float | getAngle ()
Float | getAngularDamping ()
Float | getAngularVelocity ()
String | getArea ()
String | getAreaMax (...)
String | getAreaMin ()
Boolean | getAutoSizing ()
Boolean | getAwake ()
Float | getBlendAlpha ()
String | getBlendColor (allowColorNames)
Boolean | getBlendMode ()
String | getBodyType ()
Boolean | getBullet ()
String | getChainCollisionShapeAdjacentEnd (int shapeIndex)
String | getChainCollisionShapeAdjacentStart (int shapeIndex)
Boolean | getChainCollisionShapeHasAdjacentEnd (int shapeIndex)
Boolean | getChainCollisionShapeHasAdjacentStart (int shapeIndex)
String | getChainCollisionShapeLocalPoint (int shapeIndex, int pointIndex)
Integer | getChainCollisionShapePointCount (int shapeIndex)
String | getCircleCollisionShapeLocalPosition (int shapeIndex)
Float | getCircleCollisionShapeRadius (int shapeIndex)
Boolean | getCollisionCallback ()
String | getCollisionGroups ()
String | getCollisionLayers ()
String | getCollisionMasks (...)
Boolean | getCollisionOneWay ()
Float | getCollisionShapeArea (int shapeIndex)
Integer | getCollisionShapeCount ()
Float | getCollisionShapeDensity (int shapeIndex)
Float | getCollisionShapeFriction (int shapeIndex)
Boolean | getCollisionShapeIsSensor (int shapeIndex)
Float | getCollisionShapeRestitution (int shapeIndex)
String | getCollisionShapeType (int shapeIndex)
Boolean | getCollisionSuppress ()
String | getContact (contactIndex)
Integer | getContactCount ()
Float | getDefaultDensity ()
Float | getDefaultFriction ()
Float | getDefaultRestitution ()
String | getDstBlendFactor ()
String | getEdgeCollisionShapeAdjacentEnd (int shapeIndex)
String | getEdgeCollisionShapeAdjacentStart (int shapeIndex)
Boolean | getEdgeCollisionShapeHasAdjacentEnd (int shapeIndex)
Boolean | getEdgeCollisionShapeHasAdjacentStart (int shapeIndex)
String | getEdgeCollisionShapeLocalPositionEnd (int shapeIndex)
String | getEdgeCollisionShapeLocalPositionStart (int shapeIndex)
Boolean | getFixedAngle ()
Boolean | getGatherContacts ()
Float | getGravityScale ()
Float | getHeight ()
Float | getInertia ()
Boolean | getIsPointInCollisionShape (int shapeIndex, worldPointX/Y)
Boolean | getIsPointInOOBB (worldPointX/Y)
Float | getLifetime ()
Float | getLinearDamping ()
String | getLinearVelocity ()
String | getLinearVelocityFromLocalPoint (localPointX/Y)
String | getLinearVelocityFromWorldPoint (worldPointX/Y)
String | getLinearVelocityPolar ()
Float | getLinearVelocityX ()
Float | getLinearVelocityY ()
String | getLocalCenter ()
String | getLocalPoint (float worldPointX/Y)
String | getLocalVector (float worldVectorX/Y)
Float | getMass ()
Boolean | getPickingAllowed ()
String | getPolygonCollisionShapeLocalPoint (int shapeIndex, int pointIndex)
Integer | getPolygonCollisionShapePointCount (int shapeIndex)
String | getPosition ()
Float | getPositionX ()
Float | getPositionY ()
Float | getRenderAngle ()
String | getRenderGroup ()
String | getRenderPosition ()
Integer | getScene ()
Integer | getSceneGroup ()
Integer | getSceneLayer ()
Float | getSceneLayerDepth ()
String | getSize ()
Float | getSizeX ()
Float | getSizeY ()
Boolean | getSleepingAllowed ()
Boolean | getSleepingCallback ()
String | getSortPoint ()
Float | getSortPointX ()
Float | getSortPointY ()
String | getSrcBlendFactor ()
Boolean | getUpdateCallback ()
Boolean | getUseInputEvents ()
Boolean | getVisible ()
Float | getWidth ()
String | getWorldCenter ()
String | getWorldPoint (float localPointX/Y)
String | getWorldVector (float localVectorX/Y)
Boolean | growTo (targetSize width/height, rate rateX/rateY)
Boolean | growToTime (targetSize width/height, time)
Boolean | isFadeToComplete ()
Boolean | isGrowToComplete ()
Boolean | isMoveToComplete ()
Boolean | isRotateToComplete ()
Boolean | moveTo (worldPoint X/Y, speed, [autoStop=true], [snapToTarget=true], [margin=0.1])
void | removeFromScene ()
Boolean | rotateTo (angle, speed, [autoStop=true], [warpToTarget=true])
void | safeDelete ()
void | setActive ([bool status?])
void | setAlphaTest (float alpha)
void | setAngle (float angle)
void | setAngularDamping (float damping)
void | setAngularVelocity (float velocity)
void | setArea (float x1, float y1, float x2, float y2)
void | setAwake ([bool status?])
void | setBlendAlpha (float alpha)
void | setBlendColor (float red, float green, float blue, [float alpha=1.0])
void | setBlendMode (bool blendMode)
void | setBodyType (bodyType type)
void | setBullet ([bool status?])
void | setCollisionAgainst (SceneObject object, [clearMasks?=false])
void | setCollisionCallback ([bool status?])
void | setCollisionGroups (groups)
void | setCollisionLayers (layers)
void | setCollisionMasks (groupMask, [layerMask])
void | setCollisionOneWay ([bool status?])
void | setCollisionShapeDensity (int shapeIndex, float density)
void | setCollisionShapeFriction (int shapeIndex, float friction)
void | setCollisionShapeIsSensor (int shapeIndex, bool status)
void | setCollisionShapeRestitution (int shapeIndex, float restitution)
void | setCollisionSuppress ([bool status?])
void | setDebugOff (debugOptions)
void | setDebugOn (debugOptions)
void | setDefaultDensity (float density, [bool updateShapes])
void | setDefaultFriction (float friction, [bool updateShapes])
void | setDefaultRestitution (float restitution, [bool updateShapes])
void | setDstBlendFactor (dstBlend)
void | setEnabled (bool status)
void | setFixedAngle (bool status?)
void | setGatherContacts (bool gatherContacts)
void | setGravityScale (float scale)
void | setHeight (float height)
void | setLifetime (float lifetime)
void | setLinearDamping (float damping)
void | setLinearVelocity (float velocityX, float velocityY)
void | setLinearVelocityPolar (float angle, float speed)
void | setLinearVelocityX (float velocityX)
void | setLinearVelocityY (float velocityY)
void | setPickingAllowed (bool pickingAllowed)
void | setPosition (float x, float y)
void | setPositionX (float x)
void | setPositionY (float y)
void | setRenderGroup (renderGroup)
void | setSceneGroup (integer group)
void | setSceneLayer (integer layer)
void | setSceneLayerDepth (float layerDepth)
Boolean | setSceneLayerDepthBack ()
Boolean | setSceneLayerDepthBackward ()
Boolean | setSceneLayerDepthForward ()
Boolean | setSceneLayerDepthFront ()
void | setSize (float width, float height)
void | setSizeX (float width)
void | setSizeY (float height)
void | setSleepingAllowed ([bool status?])
void | setSleepingCallback ([bool status?])
void | setSortPoint (float x, float y)
void | setSortPointX (float x)
void | setSortPointY (float y)
void | setSrcBlendFactor (srcBlend)
void | setUpdateCallback ([bool status?])
void | setUseInputEvents (bool inputStatus)
void | setVisible (bool status)
void | setWidth (float width)
Public Member Functions inherited from BehaviorComponent
Boolean | addBehavior (BehaviorInstance bi)
void | clearBehaviors ()
Boolean | connect (outputBehavior, inputBehavior, outputName, inputName)
Boolean | disconnect (outputBehavior, inputBehavior, outputName, inputName)
Integer | getBehavior (string BehaviorTemplateName)
Integer | getBehaviorByIndex (int index)
String | getBehaviorConnection (outputBehavior, outputName, connectionIndex)
Integer | getBehaviorConnectionCount (outputBehavior, outputName)
Integer | getBehaviorCount ()
Boolean | raise (outputBehavior, outputName, [deltaTime])
Boolean | removeBehavior (BehaviorInstance bi, [bool deleteBehavior=true])
Boolean | reOrder (BehaviorInstance inst, [int desiredIndex=0])
Public Member Functions inherited from DynamicConsoleMethodComponent
String | callOnBehaviors (methodName, argi)
Public Member Functions inherited from SimComponent
Boolean | addComponents (compObjName, compObjName2,...)
Integer | getComponent (idx)
Integer | getComponentCount ()
Boolean | isEnabled ()
Boolean | removeComponents (compObjName, compObjName2,...)
void | setEnabled (enabled)
Public Member Functions inherited from SimObject
Integer | clone ([copyDynamicFields=false]?)
void | delete ()
Integer | getId ()
void | setName (newName)
String | getName ()
String | getClassNamespace ()
String | getSuperClassNamespace ()
void | setClassNamespace (nameSpace)
void | setSuperClassNamespace ()
Boolean | isMethod (string methodName)
String | call (methodName, [args]*)
void | dumpClassHierarchy ()
void | dump ()
Boolean | isMemberOfClass (string classname)
String | getClassName ()
String | getFieldValue (fieldName)
Boolean | setFieldValue (fieldName, value)
Integer | getDynamicFieldCount ()
String | getDynamicField (index)
Integer | getFieldCount ()
String | getField (int index)
void | setProgenitorFile (file)
String | getProgenitorFile ()
Integer | getType ()
String | getFieldType (fieldName)
void | setInternalName (string InternalName)
String | getInternalName ()
Boolean | isChildOfGroup (groupID)
Integer | getGroup ()
Boolean | startTimer (callbackFunction, float timePeriod, [repeat]?)
void | stopTimer ()
Boolean | isTimerActive ()
Integer | schedule (time, command, [arg]*)
Boolean | save (fileName, [selectedOnly]?)
void | addFieldFilter (fieldName)
void | removeFieldFilter (fieldName)

## Member Function Documentation

Integer addSprite | ( |  | ) |

Adds a sprite at the specified logical position. You must specify the correct number of arguments for the selected layout mode. The created sprite will be automatically selected.

Parameters

  a | b c d e f Logical positions #1 & #2 and four additional and optional arguments.

Returns
  The batch Id of the added sprite or zero if not successful.

void clearSpriteAsset | ( |  | ) |

Clears any image or animation asset from the sprite.

Returns
  No return value.

void clearSprites | ( |  | ) |

Removes all sprites.

Returns
  No return value.

void deselectSprite | ( |  | ) |

Deselects any selected sprite. This is not required but can be used to stop accidental changes to sprites.

Returns
  No return value.

Boolean getBatchCulling | ( |  | ) |

Gets whether the sprites are render culled or not

Returns
  Whether the sprites are rendered culled or not.

Boolean getBatchIsolated | ( |  | ) |

Gets whether the sprites are rendered, isolated from other renderings as one batch or not.

Returns
  Whether the sprites are rendered, isolated from other renderings as one batch or not.

String getBatchLayout | ( |  | ) |

Gets the batch layout type.

Returns
  The batch layout type.

String getBatchSortMode | ( |  | ) |

Gets the batch render sort mode.

Returns
  The render sort mode.

Float getDefaultSpriteAngle | ( |  | ) |

Gets the angle at which sprites are created.

Returns
  (float angle) The angle at which sprites are created.

String getDefaultSpriteSize | ( |  | ) |

Gets the size at which sprites are created.

Returns
  (float width/float height) The size at which sprites are created.

String getDefaultSpriteStride | ( |  | ) |

Gets the stride which scales the position at which sprites are created.

Returns
  (float strideX/float strideY) The stride which scales the position at which sprites are created.

Float getSpriteAlphaTest | ( |  | ) |

Gets the sprite alpha test.

Returns
  (S32) A value of 0 to 255 if alpha testing is enabled. <0 represents disabled alpha testing.

Float getSpriteAngle | ( |  | ) |

Gets the sprite local angle.

Returns
  The sprite local angle.

String getSpriteAnimation | ( |  | ) |

Gets the sprite animation.

Returns
  The sprite animation.

Integer getSpriteAnimationFrame | ( |  | ) |

Gets current frame index used in the animation for the selected sprite. IMPORTANT: this is not the image frame number!

Returns
  The current numerical animation frame for the selected sprite

Float getSpriteBlendAlpha | ( |  | ) |

Gets the sprite color alpha (transparency).

Returns
  (float alpha) The alpha value, a range from 0.0 to 1.0. Less than zero if alpha testing is disabled.

String getSpriteBlendColor | ( | allowColorNames |  | ) |

Gets the sprite blend color

Parameters

  allowColorNames | Whether to allow stock color names to be returned or not. Optional: Defaults to false.

Returns
  (float red / float green / float blue / float alpha) The sprite blend color.

Boolean getSpriteBlendMode | ( |  | ) |

Gets whether sprite blending is on or not.

Returns
  (bool blendMode) Whether sprite blending is on or not.

Integer getSpriteCount | ( |  | ) |

Gets a count of sprites in the composite.

Returns
  The count of sprites in the composite.

String getSpriteDataObject | ( |  | ) |

Gets the sprite data object.

Returns
  The sprite data object.

Float getSpriteDepth | ( |  | ) |

Gets the sprite depth.

Returns
  The sprite depth.

String getSpriteDstBlendFactor | ( |  | ) |

Gets the sprite destination blend factor.

Returns
  (dstBlend) The sprite destination blend factor.

Boolean getSpriteFlipX | ( |  | ) |

Gets whether the sprite is flipped along its local X axis or not.

Returns
  Whether the sprite is flipped along its local X axis or not.

Boolean getSpriteFlipY | ( |  | ) |

Gets whether the sprite is flipped along its local Y axis or not.

Returns
  Whether the sprite is flipped along its local Y axis or not.

Integer getSpriteId | ( |  | ) |

Gets the SpriteBatchId of the currently selected sprite.

Returns
  The SpriteBatchId

String getSpriteImage | ( |  | ) |

Gets the sprite image.

Returns
  The sprite image.

Integer getSpriteImageFrame | ( |  | ) |

Gets the sprite image frame.

Returns
  The sprite image frame.

String getSpriteLocalPosition | ( |  | ) |

Gets the sprite local position.

Returns
  The sprite local position.

String getSpriteLogicalPosition | ( |  | ) |

Gets the sprite logical position.

Returns
  The sprite logical position.

String getSpriteName | ( |  | ) |

Gets the sprite name.

Returns
  The sprite name.

String getSpriteNamedImageFrame | ( |  | ) |

Gets the sprite named image frame.

Returns
  The sprite named image frame.

String getSpriteRenderGroup | ( |  | ) |

Gets the name of the render group used to sort the sprite during rendering.

Returns
  The render group used to sort the object during rendering.

String getSpriteSize | ( |  | ) |

Gets the sprite size.

Returns
  (float width/float height) The sprite size.

String getSpriteSortPoint | ( |  | ) |

Gets the sprite local sort point.

Returns
  The sprite local sort point.

String getSpriteSrcBlendFactor | ( |  | ) |

Gets the sprite source blend factor.

Returns
  (srcBlend) The sprite source blend factor.

String getSpriteUserData | ( |  | ) |

Gets the sprite user data.

Returns
  The sprite user data.

Boolean getSpriteVisible | ( |  | ) |

Gets whether the sprite is visible or not.

Returns
  Whether the sprite is visible or not.

Boolean isSpriteSelected | ( |  | ) |

Checks whether a sprite is selected or not.

Returns
  Whether a sprite is selected or not.

String pickArea | ( | startx/ | y,
|  | endx/ | y
| ) |  |

Picks sprites intersecting the specified area with optional group/layer masks.

Parameters

  startx/y | The coordinates of the start point as either ( y\ or (x,y)
  endx/y | The coordinates of the end point as either ( y\ or (x,y)

Returns
  Returns list of sprite Ids.

String pickPoint | ( | x/ | y | ) |

Picks sprites intersecting the specified point with optional group/layer masks.

Parameters

  x/y | The coordinate of the point as either ( y\ or (x,y)

Returns
  Returns list of sprite Ids.

String pickRay | ( | startx/ | y,
|  | endx/ | y
| ) |  |

Picks sprites intersecting the specified ray with optional group/layer masks.

Parameters

  startx/y | The coordinates of the start point as either ( y\ or (x,y)
  endx/y | The coordinates of the end point as either ( y\ or (x,y)

Returns
  Returns list of sprite Ids

Boolean removeSprite | ( |  | ) |

Removes the selected sprite.

Returns
  Whether the sprite was removed or not.

Boolean selectSprite | ( | a | b[c][d][e][f] | ) |

Selects a sprite at the specified logical position.

Parameters

  a | b c d e f Logical positions #1 & #2 and four additional and optional arguments.

Returns
  Whether the sprite was selected or not.

Boolean selectSpriteId | ( | int | batchId | ) |

Selects a sprite with the specified batch Id.

Parameters

  batchId | The batch Id of the sprite to select.

Returns
  Whether the sprite was selected or not.

Boolean selectSpriteName | ( | name |  | ) |

Selects a sprite with the specified name.

Parameters

  name | The name of the sprite.

Returns
  Whether the sprite was selected or not.

void setBatchCulling | ( | bool | batchCulling | ) |

Sets whether the sprites are culled. For sprites that are off-screen this is considerably faster during render at the expense of memory. For small composites with a few sprites, the overhead is probably not worth it.

Returns
  No return value.

void setBatchIsolated | ( | bool | batchIsolated | ) |

Sets whether the sprites are rendered, isolated from other renderings as one batch or not. When in batch isolated mode, the sprites can be optionally sorted.

Returns
  No return value.

void setBatchLayout | ( | batchLayoutType |  | ) |

Sets the batch layout type. The render sort mode is used when isolated batch mode is on.

Parameters

  batchLayoutType | 'none', 'rect' or 'iso' layout types are valid.

Returns
  No return value.

void setBatchSortMode | ( | renderSortMode |  | ) |

Sets the batch render sort mode. The render sort mode is used when isolated batch mode is on.

Returns
  No return value.

void setDefaultSpriteAngle | ( | float | angle | ) |

Sets the angle at which sprites are created.

Parameters

  angle | The angle at which sprites are created.

Returns
  No return value.

void setDefaultSpriteSize | ( | float | width | ) |

Sets the size at which sprites are created.

Parameters

  width | The default width of sprites.
  height | The default height of sprites

Returns
  No return value.

void setDefaultSpriteStride | ( | float | strideX,
|  | [float strideY] ] |
| ) |  |

Sets the stride which scales the position at which sprites are created.

Parameters

  strideX | The default stride of the local X axis.
  strideY | The default stride of the local Y axis.

Returns
  No return value.

void setSpriteAlphaTest | ( | float | alpha | ) |

Set the sprite alpha test.

Parameters

  value | Numeric value of 0.0 to 1.0 to turn on alpha testing. Less than zero to disable alpha testing.

Returns
  No return Value.

void setSpriteAngle | ( | float | localAngle | ) |

Sets the sprites local angle.

Parameters

  localAngle | The sprite local angle.

Returns
  No return value.

void setSpriteAnimation | ( | animationAssetId |  | ) |

Sets the sprite animation.

Parameters

  imageAssetId | The animation to set the sprite to.

Returns
  No return value.

void setSpriteAnimationFrame | ( | int | animationFrame | ) |

Sets the current animation frame for the selected sprite. IMPORTANT: this is not the image frame number used in the animation!

Parameters

  frame | Which frame of the animation to display

Returns
  No return value.

void setSpriteBlendAlpha | ( | float | alpha | ) |

Sets the sprite color alpha (transparency). The alpha value specifies directly the transparency of the image. A value of 1.0 will not affect the object and a value of 0.0 will make the object completely transparent.

Parameters

  alpha | The alpha value.

Returns
  No return Value.

void setSpriteBlendColor | ( | float | red,
|  | float | green,
|  | float | blue
| ) |  |

or ( stockColorName ) - Sets the sprite blend color.

Parameters

  red | The red value.
  green | The green value.
  blue | The blue value.
  alpha | The alpha value.

Returns
  No return Value.

void setSpriteBlendMode | ( | bool | blendMode | ) |

Sets whether sprite blending is on or not. Whether sprite blending is on or not.

Returns
  No return Value.

void setSpriteDataObject | ( | object |  | ) |

Set the sprite data object. NOTE: This object will be persisted alongside the composite sprite. To clear the object you can pass an empty string.

Returns
  No return Value.

void setSpriteDepth | ( | float | depth | ) |

Sets the sprites depth.

Parameters

  depth | The sprite depth.

Returns
  No return value.

void setSpriteDstBlendFactor | ( | dstBlend |  | ) |

Sets the sprite destination blend factor.

Parameters

  dstBlend | The sprite destination blend factor.

Returns
  No return Value.

void setSpriteFlipX | ( | bool | flipX | ) |

Sets whether the sprite is flipped along its local X axis or not.

Parameters

  flipX | Whether the sprite is flipped along its local X axis or not.

Returns
  No return value.

void setSpriteFlipY | ( | bool | flipY | ) |

Sets whether the sprite is flipped along its local Y axis or not.

Parameters

  flipY | Whether the sprite is flipped along its local Y axis or not.

Returns
  No return value.

void setSpriteImage | ( | imageAssetId |  | ) |

Sets the sprite image and optional frame.

Parameters

  imageAssetId | The image to set the sprite to.
  imageFrame | The image frame of the imageAssetId to set the sprite to.

Returns
  No return value.

void setSpriteImageFrame | ( | int | imageFrame | ) |

Sets the sprite image frame.

Parameters

  imageFrame | The image frame to set the sprite to.

Returns
  No return value.

void setSpriteLocalPosition | ( | float | localX,
|  | float | localY
| ) |  |

Sets the sprites local position.

Parameters

  localX | The local position X.
  localY | The local position Y.

Returns
  No return value.

void setSpriteName | ( | name |  | ) |

Set the sprite name. This must be unique within this composite sprite instance. To clear the name you can pass an empty string.

Returns
  No return Value.

void setSpriteNamedImageFrame | ( | namedFrame |  | ) |

Sets the sprite named image frame.

Parameters

  namedFrame | The named image frame to set the sprite to.

Returns
  No return value.

void setSpriteRenderGroup | ( | renderGroup |  | ) |

Sets the name of the render group used to sort the sprite during rendering.

Parameters

  renderGroup | The name of the render group to use. Defaults to nothing.

Returns
  No return value.

void setSpriteSize | ( | float | width | ) |

Sets the sprite size.

Parameters

  width | The sprite width.
  height | The sprite height

Returns
  No return value.

void setSpriteSortPoint | ( | float | localX,
|  | float | localY
| ) |  |

Sets the sprites sort point.

Parameters

  localX | The local sort point X.
  localY | The local sort point Y.

Returns
  No return value.

void setSpriteSrcBlendFactor | ( | srcBlend |  | ) |

Sets the sprite source blend factor.

Parameters

  srcBlend | The sprite source blend factor.

Returns
  No return Value.

void setSpriteUserData | ( | data |  | ) |

Set the sprite user data field.

Parameters

  data | A space separated string containing the data you wish to store.

Returns
  No return Value.

void setSpriteVisible | ( | bool | visible | ) |

Sets whether the sprite is visible or not.

Parameters

  visible | Whether the sprite is visible or not.

Returns
  No return value.