Is this sprite code ok or is there a better way to clear the screen?

I have a sprite sheet with 12 images.

When I define it I tell Corona that I have 13 like so
local spriteSetShred = sprite.newSpriteSet(spriteSheetShred, 1, 13)

By doing this it clears the screen when it hits number 13 in the loop.

Should I do this differently or is this OK?

Thanks,
Stephen

When you say "clear the screen", do you mean that at that point you're done with the sprite and wont be using it again in that scene? (Or in the game at all?)

Removing it would be better if so.

I simply want to hide is so others are visible for some period of time until I need it again.

In that case, sure, using a blank frame is fine :)

views:1559 update:2011/10/11 8:57:46
corona forums © 2003-2011