Class Index | File Index

Classes


Class BitmapSequence


Extends DisplayObject.
Displays frames or sequences of frames from a sprite sheet image. A sprite sheet is a series of images (usually animation frames) combined into a single image on a regular grid. For example, an animation consisting of 8 100x100 images could be combined into a 400x200 sprite sheet (4 frames across by 2 high). You can display individual frames, play sequential frames as an animation, and even sequence animations together. See the SpriteSheet class for more information on setting up frames and animation.
Defined in: BitmapSequence.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
BitmapSequence(spriteSheet)
Constructs a BitmapSequence object with the specified sprite sheet.
Field Summary
Field Attributes Field Name and Description
 
Specifies a funciton to call whenever any sequence reaches its end.
 
Returns the last frame of the currently playing sequence when using frameData.
 
The frame that will be drawn on the next tick.
 
Returns the currently playing sequence when using frameData.
 
Returns the first frame of the currently playing sequence when using frameData.
 
Returns the name of the next sequence that will be played, or null if it will stop playing after the current sequence.
 
Prevents the animation from advancing each tick automatically.
 
The SpriteSheet instance to play back.
Fields borrowed from class DisplayObject:
alpha, cacheCanvas, compositeOperation, id, mouseEnabled, name, onClick, onPress, parent, regX, regY, rotation, scaleX, scaleY, shadow, skewX, skewY, snapToPixel, visible, x, y
Method Summary
Method Attributes Method Name and Description
 
Because the content of a Bitmap is already in a simple format, cache is unnecessary for BitmapSequence instances.
 
gotoAndPlay(frameOrSequence)
Sets paused to false and plays the specified sequence name, named frame, or frame number.
 
gotoAndStop(frameOrSequence)
Sets paused to true and seeks to the specified sequence name, named frame, or frame number.
 
tick()
Advances the currentFrame if paused is not true.
 
Because the content of a Bitmap is already in a simple format, cache is unnecessary for BitmapSequence instances.
 
Because the content of a Bitmap is already in a simple format, cache is unnecessary for BitmapSequence instances.
Methods borrowed from class DisplayObject:
clone, draw, getConcatenatedMatrix, getStage, globalToLocal, hitTest, isVisible, localToGlobal, localToLocal, toString
Class Detail
BitmapSequence(spriteSheet)
Constructs a BitmapSequence object with the specified sprite sheet.
Parameters:
spriteSheet
The SpriteSheet instance to play back. This includes the source image, frame dimensions, and frame data. See SpriteSheet for more information.
Field Detail
callback
Specifies a funciton to call whenever any sequence reaches its end.

currentEndFrame
Returns the last frame of the currently playing sequence when using frameData. READ-ONLY.

currentFrame
The frame that will be drawn on the next tick. This can also be set, but it will not update the current sequence, so it may result in unexpected behaviour if you are using frameData.

currentSequence
Returns the currently playing sequence when using frameData. READ-ONLY.

currentStartFrame
Returns the first frame of the currently playing sequence when using frameData. READ-ONLY.

nextSequence
Returns the name of the next sequence that will be played, or null if it will stop playing after the current sequence. READ-ONLY.

paused
Prevents the animation from advancing each tick automatically. For example, you could create a sprite sheet of icons, set paused to true, and display the appropriate icon by setting currentFrame.

spriteSheet
The SpriteSheet instance to play back. This includes the source image, frame dimensions, and frame data. See SpriteSheet for more information.
Method Detail
cache()
Because the content of a Bitmap is already in a simple format, cache is unnecessary for BitmapSequence instances.

gotoAndPlay(frameOrSequence)
Sets paused to false and plays the specified sequence name, named frame, or frame number.
Parameters:
frameOrSequence

gotoAndStop(frameOrSequence)
Sets paused to true and seeks to the specified sequence name, named frame, or frame number.
Parameters:
frameOrSequence

tick()
Advances the currentFrame if paused is not true. This is called automatically when the Stage ticks.

uncache()
Because the content of a Bitmap is already in a simple format, cache is unnecessary for BitmapSequence instances.

updateCache()
Because the content of a Bitmap is already in a simple format, cache is unnecessary for BitmapSequence instances.

Documentation generated by JsDoc Toolkit 2.3.2 on Sun Feb 13 2011 22:46:00 GMT-0700 (MST)