So I’m trying to get my enemies to loop an animation, using the Spritemap class.
I can use setFrame() and setAnimFrame() with no problems, but when I use play() the animation stays on the first frame and never progresses.
Here is the relevant code:
private const move:String = "move";
public function Enemy()
{
type = "Enemy";
graphic = new Spritemap(ENEMY, 64, 64);
Spritemap(graphic).add(move, [0, 1, 2, 3, 4, 5], 1, true);
Spritemap(graphic).play(move); //not working, why????
}