how to stop or end spritesheet

Hi, i 'm new to corona , i have created a sprite sheet which plays continuously ,
local sheet3 = sprite.newSpriteSheet( “sample.png”,400,317)

local spriteSet3 = sprite.newSpriteSet(sheet3, 1, 8)
sprite.add( spriteSet3, “puma”, 1, 8, 1000, 0 ) – play 8 frames every 1000 ms

local instance3 = sprite.newSprite( spriteSet3 )
instance3.x = 2* display.contentWidth / 4 + 30
instance3.y = baseline - 5
instance3.xScale = .5
instance3.yScale = .5

instance3:prepare(“puma”)
instance3:play()
as we know spritesheet shows image sequence in loop. i want to stop play of image sequence after it completes one loop.
Any body know how can i do this? or at least provide me any link to help me out to solve this problem?

[import]uid: 52727 topic_id: 8928 reply_id: 308928[/import]

If you want a sprite to animate and NOT loop (stop after animating a full sequence), take this line that you have above:

[blockcode]
sprite.add( spriteSet3, “puma”, 1, 8, 1000, 0 ) – play 8 frames every 1000 ms
[/blockcode]

And change the last argument from a 0 to a 1.

0 = sprite instance will loop indefinitely
1 = sprite instance will animate and stop at the last frame

Source:
http://developer.anscamobile.com/reference/index/spriteadd [import]uid: 52430 topic_id: 8928 reply_id: 32604[/import]

wow… it’s working, how simple it is…

Thanks,corona rocks… [import]uid: 52727 topic_id: 8928 reply_id: 32657[/import]

You shouldn’t post the same question repeatedly in multiple places. [import]uid: 12108 topic_id: 8928 reply_id: 32687[/import]