Back

CreateSprite

Hello World
Content:
- Methods

.

spr = gfx.CreateSprite( file, group, callback ) → app object: Sprite

Methods

The following methods are available on the Sprite object:

addedboolean
alphanumber: fraction (0..1)
anglenumber: fraction (0..1)
aspectnumber
Contains( x, y ) → boolean
dataobject
Flip( horiz, vert ) → unknown
Goto( frame ) → unknown
groupstring
heightnumber: fraction (0..1)
pivotXnumber: fraction (0..1)
pivotYnumber: fraction (0..1)
Play( startFrame, speed, loop ) → unknown
PlayTo( frame ) → unknown
scaleXnumber: factor
scaleYnumber: factor
SetLoop( loop ) → unknown
SetPlaySpeed( speed ) → unknown
SetSize( w, h ) → unknown
SetSpriteSheet( sheet ) → unknown
SetTexture( tx ) → unknown
Stop() → unknown
StopAt( frame ) → unknown
Tween( target, duration, type, repeat, yoyo, callback ) → unknown
Update()
visibleboolean
widthnumber
xnumber
ynumber
number
object
string
unknown
number: fraction (0..1)
app object: Matrix
function()
The objects alpha value
The rotation fraction of the object
spr.Contains
Checks if a point is contained in the sprite
An object for saving individual extra properties.
spr.Flip
spr.Goto
The objects group identifier
The height of the object
The x pivot for rotations
The y pivot for rotations
spr.Play
spr.PlayRange
spr.PlayTo
The horizontal scaling
The vertical scaling
spr.SetLoop
spr.SetMatrix
Set the individual 2d transformation
spr.SetPlaySpeed
spr.SetRange
spr.SetSize
spr.SetSpriteSheet
spr.SetTexture
spr.SetTween
spr.Stop
spr.StopAt
spr.Tween
spr.Update
Updates internal properties
Indicates the objects visibility state
The obects width