Hi,
I was trying to make my AnimatedSprite run only once. Initially I thought it could be achieved by setting `loop` to `false` and manually calling `play()`. However that worked only first time. For instance, I wrote code to run the animation once when mouseover. Later on when the animation is over I would take my mouse elsewhere and then bring it back over the sprite to trigger animation again, but this time it wouldn't play. After lot of experimentation I figured out that I have to call `gotoAndStop(0)` in the `onComplete` callback to achieve what I wanted.
let animSprite;
// Load animSprite
animSprite.loop = false;
animSprite.gotoStop(0);
animSprite.onComplete = function () {
animSprite.gotoAndStop(0);
};
animSprite.play();
Is this the right way to achieve single-pass animation?