This seems like such an obvious thing… But I’ve been stuck on it forever.
Here’s the scenario:
Screen 1 - load pic, put into group
local localGroup = display.newGroup()
local logoLoad = function()
logoScreen = display.newImageRect( "art/logoscreen.png", 480, 320 ) -- displays background screen
logoScreen.x = 240; logoScreen.y = 160
end
logoLoad()
localGroup:insert( logoScreen ) -- adds background screen to group
localGroup:insert( chompyPic )
local function loadMainMenu( event )
director:changeScene( "heroMainMenu" )
end
timer.performWithDelay( 5000, loadMainMenu )
unloadMe = function()
end
-- MUST return a display.newGroup()
return localGroup
end
So that’s screen one.
Transition through a number of other screens.
On say Screen 4, I try to load the ‘chompy’ pic again, at get the following error:
bad argument #-2 to 'insert' (Proxy expected, got nil)
I think I missed somewhere how to handle loading & unloading pics.
Thanks!
[import]uid: 30914 topic_id: 9919 reply_id: 309919[/import]