Animated Sprites in Flixel

I have started playing with Flixel lately. I am quite impressed. I was worried about how to format the sprite-sheet for the library and discovered that the sprites could be in a single row layout

or the animation could span multiple lines.
The code to get the sprite animated remained the same. No need to even tell the API that it was a sprite that spanned multiple lines.

The code to animate the crystal reflection was…

[Embed(source = "/asset/img/crystalreflsheet.png")]
private var CrystalReflSheet:Class;	

// constructor for a FlxSprite implementation
public function CrystalSprite()
{
	super(0, 0);
	loadGraphic(CrystalReflSheet, true, false, 20, 27);
	addAnimation("anim", [0, 1, 2, 3, 4, 5], 10, true);
	play("anim");
}

and for the explosion it was…

[Embed(source = "/asset/img/explosion.png")]
private var CrystalReflSheet:Class;		

// constructor for a FlxSprite implementation
public function ExplosionEffect()
{
	super(0, 27);
	loadGraphic(CrystalReflSheet, true, false, 256, 128);
	addAnimation("anim", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], 15, true);

	play("anim");
}

The signatures of the loadGraphic and addAnimation methods are as follows:

public function loadGraphic(
	Graphic:Class,
	Animated:Boolean=false,
	Reverse:Boolean=false,
	Width:uint=0,
	Height:uint=0,
	Unique:Boolean=false
):FlxSprite

public function addAnimation(
	Name:String,
	Frames:Array,
	FrameRate:Number=0,
	Looped:Boolean=true
):void

It is also nice addition to know that your designers can design their sprites according to preference. The library seems at first play, to be very flexible and I like how easy it is to use. I can configure the effects with relative ease and get decent results.