Sprite sheet problem

Hi everyone,
I have this weird problem and it is probably my fault but can’t find a solutions so please help:

I have this code:

local pan\_sheet = sprite.newSpriteSheet( "pan\_sheet.png", 74,70)  
local pan\_spriteSet1 = sprite.newSpriteSet(pan\_sheet, 1, 12)  
  
sprite.add( pan\_spriteSet1, "walk", 1, 8, 1000, 0 )   
sprite.add( pan\_spriteSet1, "eat", 9, 12, 2000, 0 )   
  
pan:prepare("walk")  
pan:play()  
local function pan\_anim2()  
 pan:prepare("eat")  
 pan:play("eat")  
end  
timer.performWithDelay( 1000, pan\_anim2, 1 )  

When I start application, first animation is being played, and all if fine. When second animation is triggered, it plays it and then goes blank for about a second and plays the eat animation again. It happens every time and I don’t know why. Is it a bug or am I doing something wrong?

Please help.

PS: sprite sheet doesn’t have any empty frames.
[import]uid: 27699 topic_id: 9171 reply_id: 309171[/import]

Try change:

sprite.add( pan\_spriteSet1, "eat", 9, 12, 2000, 0 )

to:

sprite.add( pan\_spriteSet1, "eat", 9, 12, 2000, 1 )

[import]uid: 45878 topic_id: 9171 reply_id: 34926[/import]

Hi,

Cheers for the replay.

I manage to find the solution and it was again me not reading things properly.

sprite.add( pan\_spriteSet1, "walk", 1, 8, 1000, 0 )   
sprite.add( pan\_spriteSet1, "eat", 9, 12, 2000, 0 )   

first number is starting frame,
second number is number of frames which should be played (my mistake was that I thought it was end frame, that is why I was getting weird problems with it.)

So solution is really easy, to make it working I juts had to change it to:

sprite.add( pan\_spriteSet1, "walk", 1, 8, 1000, 0 )   
sprite.add( pan\_spriteSet1, "eat", 9, 4, 2000, 0 )   

Cheers
[import]uid: 27699 topic_id: 9171 reply_id: 34938[/import]