Sprite Sheet animate

Hi everyone.
i have this code, and all code is running and is correct but i need to make a simple animation, that is…when i touch on one of my button, the animation will be frame 1 to frame 5 and when i touch on other button i need the inverse, frame 5 to frame 1, i dont need the touch button code etc, only need help on sprite animation of frame 1 to 5 and frame 5 to 1.
this is the code:

local SpriteSheet1=SpriteAPI.newSpriteSheetFromData("ola.png",pause\_background\_code.getSpriteSheetData())  
local SpriteSet2 = SpriteAPI.newSpriteSet (SpriteSheet1, 1, 5 )  
local pause\_background = sprite.newSprite( SpriteSet2 )  

now i need to make a simple animation that i said above.

Thanks corona community :slight_smile: [import]uid: 26056 topic_id: 18007 reply_id: 318007[/import]

Take a read of this; http://developer.anscamobile.com/reference/sprite-sheets

Peach :slight_smile: [import]uid: 52491 topic_id: 18007 reply_id: 68871[/import]

i saw this link some time before, i am using sprites to do a pause animation but it dont work well, i can stop the sprite where i want and i make the respective value on the code to 0, to dont repeat, but it repeat, maybe i should use other thing to make the animation, because it is no fluid with sprites, is a animation that, when i touch on the pause button will drop a fluid little image, like world of goo pause bars, up and down bars [import]uid: 26056 topic_id: 18007 reply_id: 69019[/import]

You are using 0? 0 means repeat. If you use 1 it will then only play once.

Peach :slight_smile: [import]uid: 52491 topic_id: 18007 reply_id: 69069[/import]