sprite.timeScale

I used display.newSprite() as well. Accepted value is ranged between 0.05 to 20.00.

And it works well.

But i got another problem. I change the timeScale on runtime, and it seems the animation keep restarting to its first frame.

Is there anyone can confirm about this?

And is there a way to keep the last frame?

Thanks before…

@wilychristian: I actually never went back and tried using timeScale again, but what you might do is pause the animation, store the current frame number, change timeScale, set the frame to the frame number you stored, and then play.

Hi @wilychristian,

David is basically correct: you should read/get the current frame (no need to pause the animation), change the timescale, and then skip to that frame number.

Brent

Okay so it does restart.

Thanks David and Brent.

And as Brent wrote, we can use setFrame() without pausing the animation.