Packageardisia.components.animatedImage
Classpublic class AnimatedBitmap
InheritanceAnimatedBitmap Inheritance flash.display.Bitmap

Pure flash version of the AnimatedImage. No Flex dependencies.

Plays automatically when the "spriteSheetBmd" is set.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
Protected Methods
 MethodDefined By
  
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
Property Detail
_spriteSheetBmdproperty
public var _spriteSheetBmd:BitmapData

currentFrameproperty 
currentFrame:int  [read-only]

The currently displayed frame.

The default value is 0.


Implementation
    public function get currentFrame():int
framesLastRowproperty 
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.


Implementation
    public function get framesLastRow():Number
    public function set framesLastRow(value:Number):void
framesPerRowproperty 
framesPerRow:Number

The total number of frames per row.

Must be at least 1.

The default value is 1.


Implementation
    public function get framesPerRow():Number
    public function set framesPerRow(value:Number):void
framesPerSecondproperty 
framesPerSecond:int

The number of frames to display per second.

The default value is 3.


Implementation
    public function get framesPerSecond():int
    public function set framesPerSecond(value:int):void
rowsproperty 
rows:Number

The number of rows of frames in the spritesheet.

The default value is 1.


Implementation
    public function get rows():Number
    public function set rows(value:Number):void
spriteSheetBmdproperty 
spriteSheetBmd:BitmapData

BitmapData for the spritesheet.

The default value is null.


Implementation
    public function get spriteSheetBmd():BitmapData
    public function set spriteSheetBmd(value:BitmapData):void
Constructor Detail
AnimatedBitmap()Constructor
public function AnimatedBitmap()



Method Detail
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)