Question
Stop after certain number of frames
Hello there,
does anyone know how to stop an animation after a certain number of frames?
I don't want to put a "this.stop();" keyframe in the timeline, I want a piece of code which stop the animation.
For examle, I'm trying:
this.button.addEventListener("click", goAnim.bind(this));
function goAnim() {
this.animation.play();
if (this.animation.currentFrame==37) {
this.animation.stop();
}
}
but it doesn't work.
All of this because I need the animation to stop at certain frame and then gotoAndPlay another one.
Any ideas?
Thanks in advance
