Scaleform Studio Lua API Reference: scaleform.SpriteComponent object reference
         
	
    
    
Represents a sprite object.
			This element inherits from: 
							
							Parameters Returns | integer | The animation frame index from one to number of animations. | 
							  
							
							Parameters Returns | integer | The animation flags set for the sprite. | 
							  
							
							Parameters Returns | integer | The current animation index  from 1 to the number of animations. | 
							  
							
							Parameters Returns | integer | The current frame index from 1 to the number of frames. | 
							  
							
							Parameters Returns | integer | The index of the spritesheet loaded from 1 to number of spritesheets. | 
							  
							
							Parameters Returns | boolean | Returns true of the component is set to loop otherwise false. | 
							  
							
							Parameters Returns | integer | The number of time the animation loops. | 
							  
							
							Parameters Returns | integer | The number of loops. | 
							  
							
							Parameters Returns | boolean | Returns true of the component is set to ping pong otherwise false. | 
							  
							
							Parameters Returns |  | This function does not return any values. | 
							  
							
							Parameters | self : | scaleform.SpriteComponent | The sprite to play. | 
| forward : | boolean | The direction to animate. | 
| loopCount : | integer | Number of loops | 
Returns |  | This function does not return any values. | 
 Passing in loopCount = -1 can make the animation loop indefinitely.
							  
							
							Parameters Returns | boolean | Returns true of the component is playing otherwise false. | 
							  
							
							Parameters Returns | boolean | Returns true of the component is playing backwards otherwise false. | 
							  
							
							Parameters | self : | scaleform.SpriteComponent | The sprite currently in use. | 
| index : | integer | Index of the animation to be removed from 1 to number of animations | 
Returns |  | This function does not return any values. | 
							  
							
							Parameters Returns |  | This function does not return any values. | 
							  
							
							Parameters | self : | scaleform.SpriteComponent | The sprite currently used. | 
| index : | integer | The index of the animation from 1 to the number of animations. | 
Returns |  | This function does not return any values. | 
							  
							
							Parameters | self : | scaleform.SpriteComponent | The sprite currently used. | 
| index : | integer | The index of the frame from 1 to the number of frames. | 
Returns |  | This function does not return any values. | 
							  
							
							Parameters Returns |  | This function does not return any values. | 
							  
							
							Parameters Returns |  | This function does not return any values. | 
							  
							
							Parameters | self : | scaleform.SpriteComponent | The sprite currently used. | 
| enable : | boolean | A boolean flag to enable reversal of playing direction. | 
Returns |  | This function does not return any values. | 
							  
							
							Parameters Returns |  | This function does not return any values. | 
							   
 
     scaleform.Component
  scaleform.Component
The root type of all actor components.
 scaleform.VisualComponent
  scaleform.VisualComponent
An interface to the visual component. 
 scaleform.SpriteComponent.create (owner) : scaleform.SpriteComponent
  scaleform.SpriteComponent.create (owner) : scaleform.SpriteComponent
Creates a new sprite component.
 scaleform.SpriteComponent.add_animation (self, animation, animFlags) : integer
  scaleform.SpriteComponent.add_animation (self, animation, animFlags) : integer
Adds a series of frames that describe an animation.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently in use. animation : SpriteAnimation
  animation : SpriteAnimation
A frame that describes an animation. animFlags : integer
  animFlags : integer
Flags for the animation. integer
  integer scaleform.SpriteComponent
  scaleform.SpriteComponent
Represents a sprite object.
 SpriteAnimation
  SpriteAnimation
{ frame : integer,  frame_time : number,  sprite_sheet : integer,  }A strictly integral numeric value, with no decimal component. scaleform.SpriteComponent.animation_flags (self) : integer
  scaleform.SpriteComponent.animation_flags (self) : integer
Returns the animation flags set for direct control of animation behavior.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. integer
  integer owner : scaleform.Actor
  owner : scaleform.Actor
The owner actor of the component. scaleform.SpriteComponent
  scaleform.SpriteComponent
Returns the newly created SpriteComponent. scaleform.Actor
  scaleform.Actor
Generic objects located in a scene.
 scaleform.SpriteComponent.current_animation (self) : integer
  scaleform.SpriteComponent.current_animation (self) : integer
Returns the index of the current animation.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. integer
  integer scaleform.SpriteComponent.current_frame (self) : integer
  scaleform.SpriteComponent.current_frame (self) : integer
Returns the index of the current frame in animation.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. integer
  integer scaleform.SpriteComponent.load_sprite_sheet (self, sprite_sheet) : integer
  scaleform.SpriteComponent.load_sprite_sheet (self, sprite_sheet) : integer
Creates and loads the sprites based on the sprite sheet description.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite to load the sheet for. sprite_sheet : scaleform.SpriteSheet
  sprite_sheet : scaleform.SpriteSheet
The spritesheet to load. integer
  integer
The index of the spritesheet loaded from 1 to number of spritesheets. scaleform.SpriteSheet
  scaleform.SpriteSheet
{ frames : scaleform.SpriteFrame[],  ImgFilePath : string,  num_frames : integer,  } scaleform.SpriteComponent.looping (self) : boolean
  scaleform.SpriteComponent.looping (self) : boolean
Determines if the frame is looping one or not.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. booleantrue or false.
  booleantrue or false. scaleform.SpriteComponent.max_loops (self) : integer
  scaleform.SpriteComponent.max_loops (self) : integer
Returns the maximum amount of time the animation loops.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. integer
  integer scaleform.SpriteComponent.num_loops (self) : integer
  scaleform.SpriteComponent.num_loops (self) : integer
Returns the loop count of the animation.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. integer
  integer scaleform.SpriteComponent.ping_pong (self) : boolean
  scaleform.SpriteComponent.ping_pong (self) : boolean
Determines whether the ping pong flag for reversing the playing direction of animation
     is enabled or not.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. boolean
  boolean scaleform.SpriteComponent.play (self)
  scaleform.SpriteComponent.play (self) 
Starts animating.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite to play. scaleform.SpriteComponent.play (self, forward, loopCount)
  scaleform.SpriteComponent.play (self, forward, loopCount) 
Starts animating, either forward or backward. 
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite to play. forward : boolean
  forward : boolean
The direction to animate. loopCount : integer
  loopCount : integer
Number of loops scaleform.SpriteComponent.playing (self) : boolean
  scaleform.SpriteComponent.playing (self) : boolean
Determines whether the animation is playing.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. boolean
  boolean scaleform.SpriteComponent.playing_backwards (self) : boolean
  scaleform.SpriteComponent.playing_backwards (self) : boolean
Determines if the animation is playing backwards or not.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. boolean
  boolean scaleform.SpriteComponent.remove_animation_by_index (self, index)
  scaleform.SpriteComponent.remove_animation_by_index (self, index) 
Removes the set of frames that describe an animation.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently in use. index : integer
  index : integer
Index of the animation to be removed from 1 to number of animations scaleform.SpriteComponent.set_animation_flags (self, flags)
  scaleform.SpriteComponent.set_animation_flags (self, flags) 
Sets the animation flags that allow direct control of animation behavior.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. flags : integer
  flags : integer
The animation flags to set. scaleform.SpriteComponent.set_current_animation (self, index)
  scaleform.SpriteComponent.set_current_animation (self, index) 
Sets the index of the current animation.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. index : integer
  index : integer
The index of the animation from 1 to the number of animations. scaleform.SpriteComponent.set_current_frame (self, index)
  scaleform.SpriteComponent.set_current_frame (self, index) 
Sets the index of the current frame.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. index : integer
  index : integer
The index of the frame from 1 to the number of frames. scaleform.SpriteComponent.set_max_loops (self, loopCount)
  scaleform.SpriteComponent.set_max_loops (self, loopCount) 
Sets the maximum amount of time the animation loops.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. loopCount : integer
  loopCount : integer
The maximum number of time for the loop. scaleform.SpriteComponent.set_num_loops (self, loopCount)
  scaleform.SpriteComponent.set_num_loops (self, loopCount) 
Sets the loop count of the animation.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. loopCount : integer
  loopCount : integer
The number of loops in the animation. scaleform.SpriteComponent.set_ping_pong (self, enable)
  scaleform.SpriteComponent.set_ping_pong (self, enable) 
Sets the ping-pong flag which makes the animation loop by reversing the playing direction
     when the last or first frame is reached.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite currently used. enable : boolean
  enable : boolean
A boolean flag to enable reversal of playing direction. scaleform.SpriteComponent.stop (self)
  scaleform.SpriteComponent.stop (self) 
Stops playing the animation.
 self : scaleform.SpriteComponent
  self : scaleform.SpriteComponent
The sprite to stop.A numeric value. scaleform.SpriteFrame
  scaleform.SpriteFrame
{ anchor : integer[],  bounds : scaleform.Rect,  }A string of characters. scaleform.Rect
  scaleform.Rect
A rectangle based upon two points.
{ x1 : number,  x2 : number,  y1 : number,  y2 : number,  }Indicates a table. 
This documentation uses the term table to mean an anonymous, temporary Lua table that contains named data values.                                        You typically use these tables to pass data or settings to a function, or to hold data returned by a function.Indicates an object. 
This documentation uses the term object to mean a named Lua table or userdata value that maintains a state.                                        Some object types may have multiple instances existing at the same time, each with its own state; these objects typically have creation                                        functions or accessors that you must call in order to get an instance. Some object types have only one instance, which you always access                                        through the object's name.Indicates a named variable within a namespace, object or table; or an element within an enumeration.Indicates a code sample.Indicates an enumeration. 
This documentation uses the term  enumeration to mean a named Lua table that contains only a set of constant                                        values. These values typically identify a predefined set of options for some setting or behavior. You might pass an enumeration value to a                                        function, or test the value returned by a function against the items in the enumeration to see which option is currently set.Indicates a named variable within a namespace or object that has a pre-set constant value.Indicates a category: a semantic grouping of related API elements.Indicates a namespace. 
This documentation uses the term namespace to mean a named Lua table that exists in only one single instance,                                        intended as a container for an interface of related objects, functions and data variables.Indicates an output value returned by a function.Indicates a named function within a namespace or object.Indicates an input parameter for a function.