Module sprite

Sprite related variables and functions.

Functions

getBounds () Returns the bounds of the sprite as a Rectangle, relative to itself.
getRect () Returns the bounds of the sprite as a Rectangle, relative to itself, excluding any strokes on shapes.
beginFill (color) Starts a solid fill with the given ARGB values.
beginGradientFill (colors, ratios, vars) Starts a gradient fill with the given ARGB values and ratios.
beginBitmapFill (stamp, repeats, smooth, vars) Starts a bitmap fill with the given stamp.
endFill () Ends the current fill and applies any pending draw operations to the sprite.
lineStyle (color, thickness, vars) Specifies a line style used for subsequent draw operations, such as lineTo and drawCircle.
gradientLineStyle (colors, ratios, vars) Specifies a gradient coloring for the line stroke used for subsequent draw operations, such as lineTo and drawCircle.
bitmapLineStyle (stamp, repeats, smooth, vars) Specifies a gradient coloring for the line stroke used for subsequent draw operations, such as lineTo and drawCircle.
moveTo (x, y) Sets the current drawing position used by lineTo, curveTo, and cubicCurveTo to the given coordinates.
lineTo (x, y) Draws a line (using the current line style) from the current drawing position to the given end position, and sets the drawing position to the end position.
curveTo (controlX, controlY, anchorX, anchorY) Draws a quadratic Bezier curve (using the current line style) from the current drawing position to the given end position, and sets the drawing position to the end position.
cubicCurveTo (controlX1, controlY1, controlX2, controlY2, anchorX, anchorY) Draws a cubic Bezier curve (using the current line style) from the current drawing position to the given end position, and sets the drawing position to the end position.
drawPath (commands, winding) Draws a path based on a given command string.
drawCircle (x, y, radius) Draws a circle using the current fill and line style.
drawEllipse (x, y, width, height) Draws an ellipse using the current fill and line style.
drawRect (x, y, width, height) Draws a rectangle using the current fill and line style.
drawRoundRect (x, y, width, height, ellipseWidth, ellipseHeight) Draws a rounded rectangle using the current fill and line style.
addText (text, x, y, color, size, vars) Adds a new text field into the sprite's child list.
addChild (child, index) Adds a sprite or stamp to the sprite's child list.
removeChild (child) Removes a sprite or stamp from the sprite's child list.
clone (recursive) Creates a copy of the sprite with identical contents.
destroy () Destroys the sprite, making it unable to be drawn to, parented to, or rendered from.
clear () Clears the sprite, emptying its contents without destroying the sprite.

Fields

x The x position, in pixels, of the sprite when it is the child of another sprite.
y The y position, in pixels, of the sprite when it is the child of another sprite.
scaleX The horizontal scale of the sprite when it is the child of another sprite.
scaleY The vertical scale of the sprite when it is the child of another sprite.
scaleY The vertical scale of the sprite when it is the child of another sprite.
rotation The rotation of the sprite, in degrees, when it is the child of another sprite.
alpha The alpha of the sprite, represented by a number in the range of 0 - 1.
redMultiplier A number value that is multiplied with the red color channel when drawn.
greenMultiplier A number value that is multiplied with the green color channel when drawn.
blueMultiplier A number value that is multiplied with the blue color channel when drawn.
colorMultiplier Sets red, green, and blue multipliers based on a hexadecimal RGB value (e.g.
alphaOffset A number value from -255 to 255 that is added to the alpha channel after it is multiplied by alpha.
redOffset A number value from -255 to 255 that is added to the alpha channel after it is multiplied by redMultiplier.
greenOffset A number value from -255 to 255 that is added to the alpha channel after it is multiplied by greenMultiplier.
blueOffset A number value from -255 to 255 that is added to the alpha channel after it is multiplied by blueMultiplier.
blendMode The blend mode of the sprite.
destroyed Whether or not the sprite was destroyed.
numChildren The number of children the sprite has.


Functions

getBounds ()
Returns the bounds of the sprite as a Rectangle, relative to itself.

Returns:

    Rectangle The bounds of the sprite
getRect ()
Returns the bounds of the sprite as a Rectangle, relative to itself, excluding any strokes on shapes.

Returns:

    Rectangle The bounds of the sprite
beginFill (color)
Starts a solid fill with the given ARGB values. Subsequent draw operations will rely on this fill until the fill is ended. You must call endFill() to ensure all draw operations take effect.

Parameters:

  • color int The ARGB value of the fill. By default 0xFFFFFFFF. The simplest way to provide this value is with the 0xAARRGGBB hex format, where AA is the hex value from 0 - 255 for the alpha, RR for red, GG for green, and BB for blue.

See also:

Usage:

    someSprite.beginFill(0xFF0000FF) -- Draw everything with a solid, fully opaque blue.
    someSprite.drawEllipse(0, 0, 100, 200)
    someSprite.endFill()
    someLayer.drawSprite(someSprite)
beginGradientFill (colors, ratios, vars)
Starts a gradient fill with the given ARGB values and ratios. Subsequent draw operations will rely on this fill until the fill is ended. You must call endFill() to ensure all draw operations take effect.

To fully understand the parameters detailed below, please refer to Adobe's gradient fill and gradient box documentations:

https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html#beginGradientFill()

https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/geom/Matrix.html#createGradientBox()

Parameters:

  • colors An AS3 array of the ARGB values of the fill. The simplest way to provide these values is with the 0xAARRGGBB hex format, where AA is the hex value from 0 - 255 for the alpha, RR for red, GG for green, and BB for blue.
  • ratios An AS3 array of the color distribution ratios; valid values are 0-255. These values define the percentages of the width where the respective color is sampled at 100%. The value 0 represents the left position in the gradient box, and 255 represents the right position in the gradient box. Each value must be greater than the last.
  • vars

    An AS3 object containing any optional parameters for the gradient fill. Valid options are:

    • type (string) The type of gradient fill. Use GradientType.LINEAR or GradientType.RADIAL. By default GradientType.LINEAR.

    • width (number) The width of the gradient box. By default 127.

    • height (number) The height of the gradient box. By default 127.

    • x (number) The distance, in pixels, to translate the gradient box values to the right along the x-axis. This value is offset by half of the width parameter. By default 0.

    • y (number) The distance, in pixels, to translate the gradient box values down along the y-axis. This value is offset by half of the height parameter. By default 0.

    • rotation (number) The amount to rotate the gradient box values, in degrees.

    • focalPointRatio (number) A multiplier that controls the location of the focal point of the gradient. 0 means that the focal point is in the center. 1 means that the focal point is at one border of the gradient circle. -1 means that the focal point is at the other border of the gradient circle. A value less than -1 or greater than 1 is clamped to -1 or 1

    • spreadMethod (string) Which spread method to use. Use GradientSpreadMethod.PAD, GradientSpreadMethod.REFLECT, or GradientSpreadMethod.REPEAT. By default GradientSpreadMethod.PAD.

    • interpolationMethod (string) Which color space interpolation method to use. Use ColorInterpolationMethod.RGB or ColorInterpolationMethod.LINEAR_RGB. By default ColorInterpolationMethod.RGB.

See also:

Usage:

    local colors = toarray{0xFF0000FF, 0xFFFFFFFF} -- The gradient will be blue on the left and white on the right
    local ratios = toarray{0.3 * 255, 1 * 255} -- The gradient will be fully blue up to 30% of the way through the fill, then transition from blue to white across the remaining 70%
    someSprite.beginGradientFill(colors, ratios, toobject{type = GradientType.LINEAR, width = 100, height = 200}) -- The width and height of the gradient box will now match that of our next draw call.
    someSprite.drawRect(0, 0, 100, 200)
    someSprite.endFill()
    someLayer.drawSprite(someSprite)
beginBitmapFill (stamp, repeats, smooth, vars)
Starts a bitmap fill with the given stamp. Subsequent draw operations will rely on this fill until the fill is ended. You must call endFill() to ensure all draw operations take effect.

To fully understand the parameters detailed below, please refer to Adobe's bitmap fill and matrix box documentations:

https://airsdk.dev/reference/actionscript/3.0/flash/display/Graphics.html#beginBitmapFill()

https://airsdk.dev/reference/actionscript/3.0/flash/geom/Matrix.html#createBox()

Parameters:

  • stamp stamp A stamp that will be used for the fill.
  • repeats boolean Whether the fill repeats the bitmap or not.
  • smooth boolean Whether smoothing is applied for stamp upscaling/rotation.
  • vars

    An AS3 object containing any optional parameters for the bitmap fill. Valid options are:

    • x (number) The distance, in pixels, to translate the stamp fill to the right along the x-axis. By default 0.

    • y (number) The distance, in pixels, to translate the stamp fill down along the y-axis. By default 0.

    • scaleX (number) The factor to scale by horizontally. By default 1.

    • scaleY (number) The factor to scale by vertically. By default 1.

    • rotation (number) The amount to rotate the stamp fill, in degrees. By default 0.

See also:

Usage:

    someSprite.beginBitmapFill(someStamp,true,true,toobject{
        x = 5, y = 5,
        scaleX = 3, scaleY = 3,
        rotation = 45
    })
    someSprite.drawRect(0,0,255,255)
    someSprite.endFill()
    someLayer.drawSprite(someSprite)
endFill ()
Ends the current fill and applies any pending draw operations to the sprite.
lineStyle (color, thickness, vars)
Specifies a line style used for subsequent draw operations, such as lineTo and drawCircle.

To fully understand the parameters detailed below, please refer to Adobe's line style documentation:

https://airsdk.dev/reference/actionscript/3.0/flash/display/Graphics.html#lineStyle()

Parameters:

  • color int The ARGB value of the line style. By default 0xFFFFFFFF. The simplest way to provide this value is with the 0xAARRGGBB hex format, where AA is the hex value from 0 - 255 for the alpha, RR for red, GG for green, and BB for blue.
  • thickness int The thickness, in pixels, of the line style.
  • vars

    An AS3 object containing any optional parameters for the line style. Valid options are:

    • pixelHinting (bool) Whether or not draw operations should be hinted to full pixels. This works to reduce the blurriness of anti-aliasing by keeping line widths and curves aligned closer to exact pixel amounts.

    • scaleMode (string) The scale mode of the line style. By default "normal". Valid options are:

      • normal Always scale the line thickness when the sprite is scaled.

      • none Never scale the line thickness.

      • vertical Do not scale the line thickness if the sprite is scaled only vertically and not horizontally.

      • horizontal Do not scale the line thickness if the sprite is scaled only horizontally and not vertically.

    • caps (string) The type of caps at the end of lines drawn with this line style. Use CapsStyle enum values. By default CapsStyle.ROUND.

    • joints (string) The type of joint appearance at the angles formed by lines drawn with this line style. Use JointStyle enum values. By default JointStyle.ROUND. When using JointStyle.MITER, the length of miters is limited by the miterLimit parameter.

    • miterLimit (int) The maximum length, in pixels, of mitered joints used for the angles formed by lines drawn with this line style. By default 3. This value is clamped between 1 and 255.

See also:

Usage:

    someSprite.lineStyle(0xFFFF0000, 5) -- Draw a solid red line with a thickness of 5 pixels
    someSprite.lineTo(000, 100) -- Draw the line from (0, 0) to (0, 100)
    someSprite.lineStyle(0xFF000000, 1) -- Draw a solid black line with a thickness of 1 pixel
    someSprite.lineTo(000, 000) -- Draw the line from (0, 100) to (0, 0)
gradientLineStyle (colors, ratios, vars)
Specifies a gradient coloring for the line stroke used for subsequent draw operations, such as lineTo and drawCircle. lineStyle must be called beforehand, with the desired line thickness and parameters.

To fully understand the parameters detailed below, please refer to Adobe's gradient line style and gradient box documentations:

https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html#beginGradientFill()

https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/geom/Matrix.html#createGradientBox()

Parameters:

  • colors An AS3 array of the ARGB values of the fill. The simplest way to provide these values is with the 0xAARRGGBB hex format, where AA is the hex value from 0 - 255 for the alpha, RR for red, GG for green, and BB for blue.
  • ratios An AS3 array of the color distribution ratios; valid values are 0-255. These values define the percentages of the width where the respective color is sampled at 100%. The value 0 represents the left position in the gradient box, and 255 represents the right position in the gradient box. Each value must be greater than the last.
  • vars

    An AS3 object containing any optional parameters for the gradient fill. Valid options are:

    • type (string) The type of gradient fill. Use GradientType.LINEAR or GradientType.RADIAL. By default GradientType.LINEAR.

    • width (number) The width of the gradient box. By default 127.

    • height (number) The height of the gradient box. By default 127.

    • x (number) The distance, in pixels, to translate the gradient box values to the right along the x-axis. This value is offset by half of the width parameter. By default 0.

    • y (number) The distance, in pixels, to translate the gradient box values down along the y-axis. This value is offset by half of the height parameter. By default 0.

    • rotation (number) The amount to rotate the gradient box values, in degrees.

    • focalPointRatio (number) A multiplier that controls the location of the focal point of the gradient. 0 means that the focal point is in the center. 1 means that the focal point is at one border of the gradient circle. -1 means that the focal point is at the other border of the gradient circle. A value less than -1 or greater than 1 is clamped to -1 or 1

    • spreadMethod (string) Which spread method to use. Use GradientSpreadMethod.PAD, GradientSpreadMethod.REFLECT, or GradientSpreadMethod.REPEAT. By default GradientSpreadMethod.PAD.

    • interpolationMethod (string) Which color space interpolation method to use. Use ColorInterpolationMethod.RGB or ColorInterpolationMethod.LINEAR_RGB. By default ColorInterpolationMethod.RGB.

See also:

Usage:

    local colors = toarray{0xFF0000FF, 0xFFFFFFFF} -- The gradient will be blue on the left and white on the right
    local ratios = toarray{0.3 * 255, 1 * 255} -- The gradient will be fully blue up to 30% of the way through the fill, then transition from blue to white across the remaining 70%
    someSprite.lineStyle(0,24)
    someSprite.gradientLineStyle(colors, ratios, toobject{width = 100, height = 200, spreadMethod = GradientSpreadMethod.PAD}) -- The width and height of the gradient box will now match that of our next draw call.
    someSprite.drawRect(0, 0, 100, 200)
    someSprite.endFill()
    someLayer.drawSprite(someSprite)
bitmapLineStyle (stamp, repeats, smooth, vars)
Specifies a gradient coloring for the line stroke used for subsequent draw operations, such as lineTo and drawCircle. lineStyle must be called beforehand, with the desired line thickness and parameters.

To fully understand the parameters detailed below, please refer to Adobe's bitmap line style and matrix box documentations:

https://airsdk.dev/reference/actionscript/3.0/flash/display/Graphics.html#lineBitmapStyle()

https://airsdk.dev/reference/actionscript/3.0/flash/geom/Matrix.html#createBox()

Parameters:

  • stamp stamp A stamp that will be used for the line style.
  • repeats boolean Whether the line style repeats the stamp or not.
  • smooth boolean Whether smoothing is applied for stamp upscaling/rotation.
  • vars

    An AS3 object containing any optional parameters for the bitmap line style. Valid options are:

    • x (number) The distance, in pixels, to translate the stamp fill to the right along the x-axis. By default 0.

    • y (number) The distance, in pixels, to translate the stamp fill down along the y-axis. By default 0.

    • scaleX (number) The factor to scale by horizontally. By default 1.

    • scaleY (number) The factor to scale by vertically. By default 1.

    • rotation (number) The amount to rotate the stamp fill, in degrees. By default 0.

See also:

Usage:

    someSprite.lineStyle(0,24)
    someSprite.beginBitmapFill(someStamp,true,true,toobject{
        x = 5, y = 5,
        scaleX = 3, scaleY = 3,
        rotation = 45
    })
    someSprite.drawRect(0,0,255,255)
    someSprite.endFill()
    someLayer.drawSprite(someSprite)
moveTo (x, y)
Sets the current drawing position used by lineTo, curveTo, and cubicCurveTo to the given coordinates.

Parameters:

  • x number The x-coordinate of the new drawing position.
  • y number The y-coordinate of the new drawing position.

Usage:

    someSprite.lineTo(000, 100) -- Draw a line from (0, 0) to (0, 100)
    someSprite.moveTo(000, 000) -- Move back to (0, 0); otherwise, the next line's starting point would be (0, 100) instead of (0, 0)
    someSprite.lineTo(100, 000) -- Draw the line from (0, 0) to (100, 0)
lineTo (x, y)
Draws a line (using the current line style) from the current drawing position to the given end position, and sets the drawing position to the end position.

Parameters:

  • x number The x-coordinate of the end position for the line to be drawn to.
  • y number The y-coordinate of the end position for the line to be drawn to.

See also:

Usage:

    someSprite.lineTo(000, 100) -- Draw a line from (0, 0) to (0, 100)
    someSprite.lineTo(100, 000) -- Draw the line from (0, 100) to (100, 0)
curveTo (controlX, controlY, anchorX, anchorY)
Draws a quadratic Bezier curve (using the current line style) from the current drawing position to the given end position, and sets the drawing position to the end position.

Parameters:

  • controlX number The x-coordinate of the control point, which determines the shape of the curvature.
  • controlY number The y-coordinate of the control point, which determines the shape of the curvature.
  • anchorX number The x-coordinate of the end position for the curve to be drawn to.
  • anchorY number The y-coordinate of the end position for the curve to be drawn to.

See also:

Usage:

    someSprite.curveTo(-50, 50, -100, 0) -- Draw a curve from (0, 0) to (-100, 0), using a control point (-50, 50) to create a rightward curvature
cubicCurveTo (controlX1, controlY1, controlX2, controlY2, anchorX, anchorY)
Draws a cubic Bezier curve (using the current line style) from the current drawing position to the given end position, and sets the drawing position to the end position.

Parameters:

  • controlX1 number The x-coordinate of the first control point. The control points determine the shape of the curvature.
  • controlY1 number The y-coordinate of the first control point. The control points determine the shape of the curvature.
  • controlX2 number The x-coordinate of the second control point. The control points determine the shape of the curvature.
  • controlY2 number The y-coordinate of the second control point. The control points determine the shape of the curvature.
  • anchorX number The x-coordinate of the end position for the curve to be drawn to.
  • anchorY number The y-coordinate of the end position for the curve to be drawn to.

See also:

Usage:

    someSprite.cubicCurveTo(-50, 50, -100, -50, -150, 0) -- Draw a curve from (0, 0) to (-150, 0), using the control points (-50, 50) and (-100, -50) to create an S-like curve
drawPath (commands, winding)
Draws a path based on a given command string.

Can provide a significant performance boost over individual moveTo/lineTo/curveTo/cubicCurveTo calls.

This method behaves slightly differently from individual moveTo/lineTo/curveTo/cubicCurveTo calls, see Adobe's documentation.

https://airsdk.dev/reference/actionscript/3.0/flash/display/Graphics.html#drawPath()

Parameters:

  • commands string A string containing all of the commands for the path, e.g "M 100 100 L 250.5 -130.221 L 300 300 L 100 100". A command string can be built with the GraphicsPathCommand helper.
  • winding string A string defining the winding for the path. Use GraphicsPathWinding.EVENODD or GraphicsPathWinding.NONZERO. By default GraphicsPathWinding.EVEN_ODD.

See also:

Usage:

    local path = GraphicsPathCommand.new().moveTo(100,100).lineTo(250.5,-130.221).lineTo(300,300).lineTo(100,100).toString()
     someSprite.drawPath(path, GraphicsPathWinding.NON_ZERO)
drawCircle (x, y, radius)
Draws a circle using the current fill and line style.

Parameters:

  • x number The x-coordinate of the circle's center point.
  • y number The y-coordinate of the circle's center point.
  • radius number The radius, in pixels, of the circle.

See also:

drawEllipse (x, y, width, height)
Draws an ellipse using the current fill and line style.

Parameters:

  • x number The x-coordinate of the ellipse's center point.
  • y number The y-coordinate of the ellipse's center point.
  • width number The width, in pixels, of the ellipse.
  • height number The height, in pixels, of the ellipse.

See also:

drawRect (x, y, width, height)
Draws a rectangle using the current fill and line style.

Parameters:

  • x number The x-coordinate of the rectangle's top left point.
  • y number The y-coordinate of the rectangle's top left point.
  • width number The width, in pixels, of the rectangle.
  • height number The height, in pixels, of the rectangle.

See also:

drawRoundRect (x, y, width, height, ellipseWidth, ellipseHeight)
Draws a rounded rectangle using the current fill and line style.

Parameters:

  • x number The x-coordinate of the rectangle's top left point.
  • y number The y-coordinate of the rectangle's top left point.
  • width number The width, in pixels, of the rectangle.
  • height number The height, in pixels, of the rectangle.
  • ellipseWidth number The width, in pixels, of the ellipse used to draw the rounded corners.
  • ellipseHeight number The height, in pixels, of the ellipse used to draw the rounded corners. If none is provided, ellipseWidth is used.

See also:

addText (text, x, y, color, size, vars)
Adds a new text field into the sprite's child list.

To fully understand the parameters detailed below, please refer to Adobe's text field and text format documentations:

https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html

https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextFormat.html

Parameters:

  • text string The text to be drawn by the text field.
  • x number The x-coordinate of the text field's top left point. By default 0.
  • y number The y-coordinate of the text field's top left point. By default 0.
  • color int The ARGB value of the text field. By default 0xFFFFFFFF. The simplest way to provide this value is with the 0xAARRGGBB hex format, where AA is the hex value from 0 - 255 for the alpha, RR for red, GG for green, and BB for blue.
  • size int The size, in pixels, of the text field. By default 14.
  • vars

    An AS3 object containing any optional parameters for the gradient fill. Valid options are:

    • align (string) The alignment of the text field. Use TextFormatAlign values (LEFT, RIGHT, CENTER, JUSTIFY, START, END). By default TextFormatAlign.LEFT.

    • bold (bool) Whether or not the text should be emboldened. By default false.

    • italic (bool) Whether or not the text should be italicized. By default false.

    • underline (bool) Whether or not the text should be underlined. By default false.

    • rotation (number) The amount to rotate the text field, in degrees. By default 0.

    • width (number) The width of the text field. If none is provided, it will be calculated based on the text contents.

    • height (number) The height of the text field. If none is provided, it will be calculated based on the text contents.

    • wordWrap (bool) Whether or not the text should be word wrapped within the text field's size. By default false.

See also:

Usage:

    someSprite.addText(string.rep("Hello, world! ", 30), 0, 0, 0xFFFFAA00, 14, toobject{bold = true, wordWrap = true, width = 150, align = TextFormatAlign.CENTER}) -- Creates orange text at (0, 0), word-wrapping with a width of 150 pixels.
addChild (child, index)
Adds a sprite or stamp to the sprite's child list. Anytime the sprite is rendered, its children will also be rendered with the same transformations.

Parameters:

  • child sprite/stamp The sprite or stamp to be parented.
  • index int The index position to add the child into. By default the end of the list.
removeChild (child)
Removes a sprite or stamp from the sprite's child list.

Parameters:

  • child sprite/stamp The child sprite or stamp to be removed.
clone (recursive)
Creates a copy of the sprite with identical contents.

Parameters:

  • recursive boolean Whether or not the contents of the sprite's children are copied to the clone.

Returns:

    sprite Returns the clone of the sprite
destroy ()
Destroys the sprite, making it unable to be drawn to, parented to, or rendered from.
clear ()
Clears the sprite, emptying its contents without destroying the sprite.

Fields

x
The x position, in pixels, of the sprite when it is the child of another sprite. By default 0.
y
The y position, in pixels, of the sprite when it is the child of another sprite. By default 0.
scaleX
The horizontal scale of the sprite when it is the child of another sprite. By default 1.
scaleY
The vertical scale of the sprite when it is the child of another sprite. By default 1.
scaleY
The vertical scale of the sprite when it is the child of another sprite. By default 1.
rotation
The rotation of the sprite, in degrees, when it is the child of another sprite. By default 0.
alpha
The alpha of the sprite, represented by a number in the range of 0 - 1. An alpha of 0 means the sprite is completely transparent; 1 means fully visible. By default 1.
redMultiplier
A number value that is multiplied with the red color channel when drawn. By default 1.
greenMultiplier
A number value that is multiplied with the green color channel when drawn. By default 1.
blueMultiplier
A number value that is multiplied with the blue color channel when drawn. By default 1.
colorMultiplier
Sets red, green, and blue multipliers based on a hexadecimal RGB value (e.g. 0xFF0000). Write-only.
alphaOffset
A number value from -255 to 255 that is added to the alpha channel after it is multiplied by alpha. By default 0.
redOffset
A number value from -255 to 255 that is added to the alpha channel after it is multiplied by redMultiplier. By default 0.
greenOffset
A number value from -255 to 255 that is added to the alpha channel after it is multiplied by greenMultiplier. By default 0.
blueOffset
A number value from -255 to 255 that is added to the alpha channel after it is multiplied by blueMultiplier. By default 0.
blendMode
The blend mode of the sprite. Use BlendMode enum values. By default BlendMode.NORMAL.

See also:

destroyed
Whether or not the sprite was destroyed. Calling destroy sets this to true. Read-only.
numChildren
The number of children the sprite has. By default 0. Read-only.

See also:

generated by LDoc 1.5.0 Last updated 2025-12-17 05:13:02