Package | net.flashpunk.graphics |
Class | public class Anim |
Inheritance | Anim Object |
Property | Defined By | ||
---|---|---|---|
frameCount : uint [read-only]
Amount of frames in the animation. | Anim | ||
frameRate : Number [read-only]
Animation speed. | Anim | ||
frames : Array [read-only]
Array of frame indices to animate. | Anim | ||
loop : Boolean [read-only]
If the animation loops. | Anim | ||
name : String [read-only]
Name of the animation. | Anim |
Method | Defined By | ||
---|---|---|---|
Anim(name:String, frames:Array, frameRate:Number = 0, loop:Boolean = true)
Constructor. | Anim | ||
play(reset:Boolean = false):void
Plays the animation. | Anim |
frameCount | property |
frameCount:uint
[read-only] Amount of frames in the animation.
public function get frameCount():uint
frameRate | property |
frameRate:Number
[read-only] Animation speed.
public function get frameRate():Number
frames | property |
frames:Array
[read-only] Array of frame indices to animate.
public function get frames():Array
loop | property |
loop:Boolean
[read-only] If the animation loops.
public function get loop():Boolean
name | property |
name:String
[read-only] Name of the animation.
public function get name():String
Anim | () | Constructor |
public function Anim(name:String, frames:Array, frameRate:Number = 0, loop:Boolean = true)
Constructor.
Parametersname:String — Animation name.
| |
frames:Array — Array of frame indices to animate.
| |
frameRate:Number (default = 0 ) — Animation speed.
| |
loop:Boolean (default = true ) — If the animation should loop.
|
play | () | method |
public function play(reset:Boolean = false):void
Plays the animation.
Parameters
reset:Boolean (default = false ) — If the animation should force-restart if it is already playing.
|