Package | ardisia.components.animatedImage |
Class | public class AnimatedBitmap |
Inheritance | AnimatedBitmap ![]() |
Plays automatically when the "spriteSheetBmd" is set.
Property | Defined By | ||
---|---|---|---|
currentFrame : int [read-only]
The currently displayed frame. | AnimatedBitmap | ||
framesLastRow : Number
The total number of frames present in the last row of the spritesheet. | AnimatedBitmap | ||
framesPerRow : Number
The total number of frames per row. | AnimatedBitmap | ||
framesPerSecond : int
The number of frames to display per second. | AnimatedBitmap | ||
rows : Number
The number of rows of frames in the spritesheet. | AnimatedBitmap | ||
_spriteSheetBmd : BitmapData | AnimatedBitmap | ||
spriteSheetBmd : BitmapData
BitmapData for the spritesheet. | AnimatedBitmap |
Method | Defined By | ||
---|---|---|---|
AnimatedBitmap | |||
dispose():void
Call to remove the component from the display list, remove any
event listeners and dispose of any BitmapData. | AnimatedBitmap | ||
jumpToFrame(frame:int = -1):void
Jump to the passed frame. | AnimatedBitmap | ||
play():void
Start the animation. | AnimatedBitmap | ||
stop(endFrame:int = -1):void
Stop the animation. | AnimatedBitmap |
Method | Defined By | ||
---|---|---|---|
displayCurrentFrame():void
Displays the current frame. | AnimatedBitmap | ||
eventHandler(event:Event):void
Handles events on the component. | AnimatedBitmap | ||
nextFrame():void
Displays the next frame in the animation. | AnimatedBitmap |
_spriteSheetBmd | property |
public var _spriteSheetBmd:BitmapData
currentFrame | property |
currentFrame:int
[read-only] The currently displayed frame.
The default value is 0
.
public function get currentFrame():int
framesLastRow | property |
framesLastRow:Number
The total number of frames present in the last row of the spritesheet.
Must be at least 1.
The default value is 1
.
public function get framesLastRow():Number
public function set framesLastRow(value:Number):void
framesPerRow | property |
framesPerRow:Number
The total number of frames per row.
Must be at least 1.
The default value is 1
.
public function get framesPerRow():Number
public function set framesPerRow(value:Number):void
framesPerSecond | property |
framesPerSecond:int
The number of frames to display per second.
The default value is 3
.
public function get framesPerSecond():int
public function set framesPerSecond(value:int):void
rows | property |
rows:Number
The number of rows of frames in the spritesheet.
The default value is 1
.
public function get rows():Number
public function set rows(value:Number):void
spriteSheetBmd | property |
spriteSheetBmd:BitmapData
BitmapData for the spritesheet.
The default value is null
.
public function get spriteSheetBmd():BitmapData
public function set spriteSheetBmd(value:BitmapData):void
AnimatedBitmap | () | Constructor |
public function AnimatedBitmap()
displayCurrentFrame | () | method |
protected function displayCurrentFrame():void
Displays the current frame.
dispose | () | method |
public function dispose():void
Call to remove the component from the display list, remove any event listeners and dispose of any BitmapData.
eventHandler | () | method |
protected function eventHandler(event:Event):void
Handles events on the component.
Parameters
event:Event — the Event that triggered the handler
|
jumpToFrame | () | method |
public function jumpToFrame(frame:int = -1):void
Jump to the passed frame.
Parameters
frame:int (default = -1 ) — jump to passed frame; 0 based counting (the first frame is
frame number 0)
|
nextFrame | () | method |
protected function nextFrame():void
Displays the next frame in the animation.
play | () | method |
public function play():void
Start the animation. Must have set the "spriteSheetBmd" first.
stop | () | method |
public function stop(endFrame:int = -1):void
Stop the animation.
Parameters
endFrame:int (default = -1 ) — jump to a particular frame after stopping the animation;
(the first frame is frame number 0)
|