Sprite sheet delay

When I do some animation with a sprite sheet, the first time you run the animation takes a moment to play. The next time you play you do instantly. I guess it’s because it is preloaded into memory.

How to preload a sprite sheet does not appear why the delay?

I would love to know too!

I would love to know too!

Someone from the staff that a solution?

Are you using the sprite* api or the display.newSprite() api?

display.newSprite()  api

Hi @fferraro67,

Are you loading a very large image sheet into memory? If so, you should do this in a non-time-critical stage of your app, just like where you’d load anything of “weight” like sounds, process/read files, etc.

Brent

Is a sprite sheet of 537 Kb, in grayscale. Is very light. It should not take to run the animation after giving the order. But it does so the first time instant. Ok, I’ll try what you tell me.

Thanks.

Someone from the staff that a solution?

Are you using the sprite* api or the display.newSprite() api?

display.newSprite()  api

Hi @fferraro67,

Are you loading a very large image sheet into memory? If so, you should do this in a non-time-critical stage of your app, just like where you’d load anything of “weight” like sounds, process/read files, etc.

Brent

Is a sprite sheet of 537 Kb, in grayscale. Is very light. It should not take to run the animation after giving the order. But it does so the first time instant. Ok, I’ll try what you tell me.

Thanks.