Hi everyone,
I am having a very strange issue:
I have created using zwoptex first, and texture packer a 2 frames sprite image. But the problem is that every time I try to implement the spritesheet I get an error:
bad argument #2 to 'newImageSheet' (for single frame size, 'options' table must contain valid 'width' and 'height' values)
and here’s my code implementation:
local catSheetData = { width =139, height =122, numFrames=2, sheetContentWidth=128, sheetContentHeight=256 } local catImageSheet = graphics.newImageSheet("cat\_running.png", options) local sequenceCatData = { {name="catRun", start=1, count=2, time=750} } local runcat = display.newSprite(catImageSheet, sequenceCatData) runcat.x = \_W\*0.5 - 190 runcat.y = \_H\*0.5 + 100 runcat:scale(0.3, 0.3) runcat:setSequence("catRun") runcat:play()
and I have included the attached spritesheet png file I am using. I have tried using other different sprites from tutorials and it all works fine, but when I try to use my own sprite that I created using zwoptex and Texture packer I get the above error.
Anyone knows what’s going on? What am I doing wrong?
Any help is highly appreciated.
Thanks