Wierd problem with sprites

I think this is a problem with Corona SDK…

I have a small sprite sheet to animate the weapon of my character.

It contains 3 sprites.

In animation data I have specified start = 2 and count = 2.

This means that when I play that sequence, sprite 2 and 3 are gonna be played.

Works.

Now if I try to detect currently showing frame of the sequence (using object.frame), it won’t detect the 3rd sprite.

If I try to setFrame to 3, the terminal will say that the sequence doesn’t have 3 sprites.

But if I specify count = 3 , the terminal will say that it’s outside of the sprite sheet, however the 3rd sprite will get detected!

It’s not a big deal for this small sprite sheet, however the sprite sheet to animate the body of my character has 30 sprites, and more sequences. It’s giving me problems there.

This is probably a problem with Corona.

My sprites have always worked as normal, but I don’t often use the setFrame function so maybe I’m missing something. I did just test it myself and it seems to work fine. Are you sure that your spritesheet and options measurements all match? 

Can you provide your code and a screencap of your spritesheet in question?

EDIT:

Been playing around with it for some more time and found out that it works fine… object.frame displays the current frame of the currently loaded sequence (also says at Corona API).

So you first check which sequence is playing, then you start checking for individual frames.

It counts from the starting sprite of the sequence, not the entire sprite sheet.

In my case, which I’ve described above, that sequence have sprites 2 and 3.

3rd sprite of the sprite sheet is 2nd sprite of the sequence.

It works fine, sorry for bothering.

Sounds good, glad you solved it!

I’ll just mark as solved, so people don’t check this anymore…

damn I should check the code twice before starting a thread on the forums.

My sprites have always worked as normal, but I don’t often use the setFrame function so maybe I’m missing something. I did just test it myself and it seems to work fine. Are you sure that your spritesheet and options measurements all match? 

Can you provide your code and a screencap of your spritesheet in question?

EDIT:

Been playing around with it for some more time and found out that it works fine… object.frame displays the current frame of the currently loaded sequence (also says at Corona API).

So you first check which sequence is playing, then you start checking for individual frames.

It counts from the starting sprite of the sequence, not the entire sprite sheet.

In my case, which I’ve described above, that sequence have sprites 2 and 3.

3rd sprite of the sprite sheet is 2nd sprite of the sequence.

It works fine, sorry for bothering.

Sounds good, glad you solved it!

I’ll just mark as solved, so people don’t check this anymore…

damn I should check the code twice before starting a thread on the forums.