OpenFL Animation


I’m a beginner at Haxe, and most languages. And I’m trying to make an animation using OpenFL and sprite sheets and I have no ideia of what I’m doing, I know making it using Heaps (animation = new Anim(“array”, “fps”, s2d);), but I really need help with OpenFL.


Look at the “AnimatedTilemap” sample, it might be a good starting point:

openfl create AnimatedTilemap
cd AnimatedTilemap
openfl test neko

It uses a simple AnimatedTile class to handle the animation. It probably would be better, if you have a lot of animation, to remove the Lib.getTimer line, though, and to call that only once per animation frame globally, then pass in the deltaTime value to each tile:

There’s also a spritesheet library on Haxelib that’s compatible with OpenFL. There’s some examples here:

I’d be happy to consider even more ways to make it easy to integrate animations into OpenFL

There’s also support for SWF animations, but I’m sharing the above since you asked specifically about using sprite sheets