Closed SudoPlz closed 8 years ago
Right now I use this code to reset the animation back to frame 0.. Is it correct?
private function resetArmature(arm:Armature):void {
arm.animation.stop();
if(arm.animation.lastAnimationState)
{
arm.animation.gotoAndPlay(arm.animation.lastAnimationState.name,0);
}else{
arm.animation.play();
}
arm.animation.lastAnimationState.currentTime = 0;
arm.advanceTime(0);
arm.animation.stop();
}
I had same issue year ago and have it right now. Is it possible to reset animation to first frame and stop?
Now, you can use armature.animation.gotoAndStopByTime()
Hey guys,
1) first of all I would like to know how I can reset the animation back to frame 0 after it has successfuly completed?
2) is there a loop property (it would be great if there was an animation.loop property) so that you can set if you want the animation to loop or not on the fly?
Thanks