How to stop spritesheet animation looping in spritesheet library?

@singmajesty

I am using haxelib spritesheet library for sprite animation (https://lib.haxe.org/p/spritesheet) .
The problem I am facing is the animation keeps on looping endlessly.
How do I stop the spritesheet animation once it reaches its last frame.

There is a loop property in the BehaviorData parameter.
If I set this loop property to false, It skips all the frames in between and directly jumps to the last frame.
It should play the in-between frames and then go to and stop at the last frame.

Please suggest how to stop looping of the spritesheet animation once it reaches its last frame.

Hmm, that might be a bug in the loop property. The other way you can also try to handle things is to show the animated behavior, then show a non-animated behavior. For example

animatedSprite.showBehaviors ([ animatedBehavior, idleBehavior ]);

Also, perhaps check if you are calling showBehavior with the restart property true or false, if it is false, then it will not replay the animation if it’s already been played before.