umm, that didn’t work either, still get same error … what version are you on Brent?
local options = {
frames = {
{ x=0, y=0, width=40, height=34},
{ x=0, y=35, width=40, height=34}
},
sheetContentWidth=40,
sheetContentHeight=68
}
local chest\_imageSheet = graphics.newImageSheet( "media/images/chest\_imageSheet.png", options )
-- oldChest = display.newImageRect(scene.view, chest\_imageSheet, 1, 40, 34 )
oldChest = display.newImageRect(chest\_imageSheet, 1, 40, 34 )
oldChest:setReferencePoint( display.TopLeftReferencePoint )
oldChest.x, oldChest.y = display.contentWidth \* 0.55, display.contentHeight \* 0.75
oldChest:setFrame(2) -- TODO: testing - delete afterwards
[import]uid: 140210 topic_id: 18670 reply_id: 106467[/import]
You still need to define the image as a “sprite”, just not in the same method as the old sprite API. Then you should be able to change its frames.