I’m not entirely sure what the proper usage is with spritesheets, since there are no examples given in the documentation, non-working example:
…
local buttonData = require “Buttons”
local buttonSSData = buttonData.getSpriteSheetData()
buttonSSheet = sprite.newSpriteSheetFromData(“img/buttons/Buttons.png”,buttonSSData)
…
goButton = widget.newButton{
id = “goBtn”,
left = display.contentWidth/2,
top = 40,
width = 76, height = 76,
onEvent = sendWave,
sheet = buttonSSheet,
defaultIndex = 23,
overIndex = 24
}
using build 2012.833
error given:
Runtime Error
bad argument #2 to ‘_newImageRect’ (ImageSheet expected, got userdata)
stack traceback:
[C] : ?
[C]: in function ‘_newImageRect’
?: in function ‘newImageRect’
?: in function <?:311>
(tail call): ?
[import]uid: 130172 topic_id: 27662 reply_id: 327662[/import]