Can sprites not loop?

In the sprite API documentation, I see there is a “loopCount” value to control looping:
http://developer.anscamobile.com/reference/index/spriteadd

However the documentation only describes how to set the number of loops and not how to play through without looping, stopping on the last frame.

I suppose I can put an event listener on the sprite, checking the frame number as it plays and then calling pause() when it’s on the last frame, but that seems like a really clunky approach. Is there already built-in functionality to do this? [import]uid: 12108 topic_id: 4538 reply_id: 304538[/import]

Setting it to 1 should do that.
Of course if you plan to play() the same sprite again, you need to use prepare(“sequence”) beforehand or it will start looping. [import]uid: 11024 topic_id: 4538 reply_id: 14329[/import]

oh that’s what 1 does? I figured 1 loop meant it plays through and stops at the beginning again.

In that case, now I’m wondering about the other way around. Is there a setting to play through and stop back at the beginning? I think the event listener I described would be a little cleaner in this case, but it still seems like there ought to be a simpler approach.


For clarification here, there are two subtly different situations I’m talking about and both are enormously useful. Let’s say you have an animation with 3 frames.

Playing through and stopping at the end would be:
1 2 3

Playing through and stopping back at the beginning would be:
1 2 3 1 [import]uid: 12108 topic_id: 4538 reply_id: 14359[/import]