| Package | ardisia.components.animatedImage |
| Class | public class AnimatedBitmap |
| Inheritance | AnimatedBitmap flash.display.Bitmap |
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:NumberThe 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:NumberThe 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:intThe 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:NumberThe 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:BitmapDataBitmapData 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():voidDisplays the current frame.
| dispose | () | method |
public function dispose():voidCall to remove the component from the display list, remove any event listeners and dispose of any BitmapData.
| eventHandler | () | method |
protected function eventHandler(event:Event):voidHandles events on the component.
Parameters
event:Event — the Event that triggered the handler
|
| jumpToFrame | () | method |
public function jumpToFrame(frame:int = -1):voidJump 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():voidDisplays the next frame in the animation.
| play | () | method |
public function play():voidStart the animation. Must have set the "spriteSheetBmd" first.
| stop | () | method |
public function stop(endFrame:int = -1):voidStop the animation.
Parameters
endFrame:int (default = -1) — jump to a particular frame after stopping the animation;
(the first frame is frame number 0)
|