How do you control frame traversal of non-consecutive sequences?

So I’ve read the sprite animation documentation, however it doesn’t appear Corona supports consecutive sequence traversal of non-consecutive sequences. For example, non consecutive sequences don’t appear to have a start and count parameter which is what I need. I could just create two sprite sheets with the same images and go from there but that seems like a waste of memory. What do you think? Any help would be greatly appreciated!

Can you give us a snippet showing what you’re trying to do?

I am not clear what you are trying to achieve.  AFAIK, there is no limit on how you arrange your sequence ordering.  i.e. You can play any set of frames in any order.

Also, what is a ‘consecutive sequence traversal’?  I see the API docs use the term consecutive and non-consecutive’ frames, but I’m having difficulty correlating that to your question: 

https://docs.coronalabs.com/api/library/display/newSprite.html#single-sequence-non-consecutive-frames

Idea: Maybe give a short example your ‘non consecutive sequences’ and maybe I can give more feedback.

Looking at the docs, I see this example of non-consecutive frames:

local sequenceData = { name="walking", frames= { 3, 4, 5, 6, 7, 8 }, -- frame indexes of animation, in image sheet time = 240, loopCount = 0 -- Optional ; default is 0 }

While you are right, that you don’t have a ‘count()’ function available to you, can always just do this:

local start = sequenceData.frames[0] local count = #sequenceData.frames

i.e. Since you defined it and have a handle to the sequenceData table, you’ve got all the data you need.

Can you give us a snippet showing what you’re trying to do?

I am not clear what you are trying to achieve.  AFAIK, there is no limit on how you arrange your sequence ordering.  i.e. You can play any set of frames in any order.

Also, what is a ‘consecutive sequence traversal’?  I see the API docs use the term consecutive and non-consecutive’ frames, but I’m having difficulty correlating that to your question: 

https://docs.coronalabs.com/api/library/display/newSprite.html#single-sequence-non-consecutive-frames

Idea: Maybe give a short example your ‘non consecutive sequences’ and maybe I can give more feedback.

Looking at the docs, I see this example of non-consecutive frames:

local sequenceData = { name="walking", frames= { 3, 4, 5, 6, 7, 8 }, -- frame indexes of animation, in image sheet time = 240, loopCount = 0 -- Optional ; default is 0 }

While you are right, that you don’t have a ‘count()’ function available to you, can always just do this:

local start = sequenceData.frames[0] local count = #sequenceData.frames

i.e. Since you defined it and have a handle to the sequenceData table, you’ve got all the data you need.