Hi,
I load my ImageSheet like this:
[lua]
local newTongue = {};
local sheetData =
{
width = 53,
height = 10,
numFrames = 2,
– The params below are optional; used for dynamic resolution support
sheetContentWidth = 106, – width of original 1x size of entire sheet
sheetContentHeight = 10, – height of original 1x size of entire sheet
}
local sequenceData = {
{ name = “start2”, frames={ 1, 2}, time = 250, loopCount = 1 },
}
local mySheet = graphics.newImageSheet(“tongue_left.png”, sheetData );
newTongue = display.newSprite(mySheet, sequenceData)
[/lua]
and play it back like this:
[lua]
newTongue:setSequence(“start2”)
newTongue:play()
[/lua]
Problem is, sprite sheet get’s loaded but won’t animate. Unless I increase frames of the sequence data’s frames to like {1,2,1} or make loopCount to 2 or more. And if I make loopCount to 2, it won’t play the animation back 2 times, it gets played back infinitely!
My image file that I’m loading is sized at 106x10 and has two frames and each frame is 53x10.
What’s the problem?
Thanks. [import]uid: 206803 topic_id: 37379 reply_id: 67379[/import]