Blitting Usage
==============
Creating SpriteSheets
---------------------
var sprite:SpriteSheet = SpriteSheet.create(name:String, image:*, frameWidth:uint, frameHeight:uint, flipped:Boolean=false, trim:Boolean=true, fillColor:uint=0x00000000, transparent:Boolean=true, drawBounds:Boolean=false);
SpriteSheet.create() creates a new spritesheet.
Example :
Spritesheet.create("Jones", new BMD_OR_BMP_REF, 64, 64, true, true);
Adding Animations
-----------------
addSequence(sprite:String, label:String, col:uint, row:uint, colspan:uint=1, rowspan:uint=1, delay:uint=0, bounce:Boolean=false, reverse:Boolean=false);
SpriteSheet.addSequence() adds an animation sequence to a stored spritesheet.
Example:
Spritesheet.addSequence("Jones", "walk", 0, 0, 1, 8, 2);
The BlitSprite
--------------
new BlitSprite(sprite:String="", sequence:String="", flipped:Boolean=false, frame:int=0, rotation:uint=0);
This creates and returns a BlitSprite responsible for animation and rendering of an individual sprite.
Example:
object.sprite = new BlitSprite("Jones", "idle");
Animation & Rendering
---------------------
When rendering, you have two methods available;
Spritesheet.animate(blit:BlitSprite);
advances the animation by one frame for the sprite and
SpriteSheet.draw(blit:BlitSprite, canvas:BitmapData, x:int=0, y:int=0, mergeAlpha:Boolean=true);
which draws the sprite onto a given canvas.