I’ve have to comeback to version 1.0 to test my app.
I will investigate it again, due I was bussy putting my app on AppleStore.
What I’ve noted that screen turn black between menu screen and level splash screen without ability to reach in game screen. In general my code use something like this:
definitions of images:
background=display.newImage(“background.jpg”,0,0)
menu=display.newGroup – here I store all menu buttons graphics/objects declared similar as background.
button1=display.newImage(“buttonPlay.png”,100,80)
button1.isVisible=false
background.isVisible=false
…
… and so on…
then in Main
background.isVisible=true
menu.isVisible=true
r=display.getCurrentStage()
r:insert(background)
r:insert(menu)
in other part…
button1:addEventListener(“tap”, switchLevel)
when a button is pressed (tapped) I switch between screen in this way:
then
local switchLevel = function(event)
freeR() – is a function to remove all r childrens and put each child=nil
statusBar.isVisible=true
coins.isVisible=true
background-level1.isVisible=true
r:insert(background-level1)
r:insert(coins)
r:insert(statusBar)
timer.performWithDelay(2000, inGame)
end
I use “r” as displayGroup to insert and re order screens.
I guess you get the idea. [import]uid: 3022 topic_id: 371 reply_id: 676[/import]