SpriterMC
The ultimate 2D skeletal animation tool meets the Starling framework

SpriterMC is a Starling implementation for importing skeletal (and non-skeletal) animations generated with Spriter, complete with a familiar API mimicking Starling MovieClip. It currently supports all features of the Spriter file format (version a4.1), with future support planned for any subsequent changes to SCML.

Features
  • Friendly and familiar API mimicking the Starling MovieClip
  • Generates a SpriterMC from a provided SCML filepath (all loading is handled for you)
  • Effortlessly create multiple instances of existing SpriterMCs with little to no additional memory or processing
  • Accepts a preloaded TextureAtlas or creates one for you from individual assets referenced in the SCML file
  • New: Display underlying bone structure (for debugging)
  • New: Add sounds and callbacks to specific frames
  • Framerate-irrelevant playback features ability to play and adjust your SpriterMC's playbackSpeed in real time, even reversing play direction altogether
  • Switch between Animations in the SpriterMC effortlessly
  • Switch out TexturePacks at runtime to completely change the graphics used
Simple Example
The simplest usage is as follows: it loads your SpriterMC's individual assets, convert them into a TextureAtlas, and plays the SpriterMC as soon as it is fully loaded. Any calls made on a SpriterMC before it is fully loaded will be queued and processed once it is ready:
var _hero1:SpriterMC = SpriterMCFactory.createSpriterMC("hero", "xml/hero.scml");
addChild(_hero1);
myJuggler.add(_hero1);
_hero1.play();

However, the best solution is to pass a preloaded TextureAtlas. This example also shows how you can add a callback to wait until the SpriterMC is fully loaded:

var _hero1:SpriterMC = SpriterMCFactory.createSpriterMC("hero", "xml/hero.scml", _textureAtlas, spriterReadyHandler);

private function spriterReadyHandler($e:Event):void
{
	var $mySpriterMC:SpriterMC = $e.target as SpriterMC;
	addChild($mySpriterMC);
	myJuggler.add($mySpriterMC);
	$mySpriterMC.play();
}

From there, it becomes incredibly easy and efficient to create multiple instances of your SpriterMC:

var _hero2:SpriterMC = SpriterMCFactory.generateInstance("hero", spriterReadyHandler);