Hi folks.
Playing around with new spritesheet features (Jon Beebe explained here: http://blog.anscamobile.com/2012/03/image-sheets-image-groups-and-sprites/ ) I have this issue:
In simulator - everything seems to be fine.
When I build this for Android and install apk to my device (HTC Desire) at first run - its ok, but when I press home button and relaunch the app, instead of image from spritesheet (local buddy) I see white square.
Background image (local bg) is presented fine.
SDK version 2012.776
Any ideas what I did wrong?
Thanks for your help.
Here is a simplified version of my code:
[lua]_W=display.contentWidth
_H=display.contentHeight
local options =
{
– array of tables representing each frame (required)
frames = {
{
x = 673,
y = 1310,
width = 408,
height = 607,
},
},
– optional params; used for dynamic resolution support
sheetContentWidth = 2048,
sheetContentHeight = 2048
}
local imageSheet = graphics.newImageSheet( “data.png”, options)
local bg = display.newImage(“bg.jpg”)
bg:setReferencePoint(display.CenterReferencePoint);
bg.x = _W*0.5; bg.y = _H*0.5+100;
local buddy = display.newImage( imageSheet, 1 )
buddy.x=_W*0.5;buddy.y=_H*0.5;[/lua] [import]uid: 123209 topic_id: 24187 reply_id: 324187[/import]
