Hi,
I am experimenting with newImageSheet and I am getting the following erroe:
bad argument #2 to 'newImageSheet' (for single frame size, 'options' table must contain valid 'width' and 'height' values)
my code is as follows:
local sheet\_numbers = graphics.newImageSheet("numbers.png", {width = 290, height = 329, numFrames = 28, sheetContentWidth = 109, sheetContentHeight = 124}) local sequence\_numbers = { { name = "allLetters", frames = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28 }, time = 500, loopCount = 3, loopDirection = "forward" } } local numbers = display.newSprite( sheet\_numbers, sequence\_numbers )
If I remove (sheetContentHeight = 124) the error goes away.
My understanding is that sheetContentHeight and sheetContentWidth are used to scale the sprite upon loading (which is what I am trying to achieve).
My image(attached) is a (2030 x 1316) png file.
Any help with this error is highly appreciated.