I’ve got these scenes
main -> goes directly to mainmenu
mainmenu - after pressing a button goes to game
game - pressing a button brings up popup scene
popup - shows two buttons, resume and mainmenu button. on resume it just closes popup and on mainmenu it closes popup and sets storyboard.state.paused.GoToMainMenu = true which I then back in game scene check for in the -> function scene:overlayEnded( event ) and if true I do this: storyboard.gotoScene( “mainmenu” )
however that genterates this error:
stack overflow stack traceback [C]: in function ‘print’
image: http://i.imgur.com/strO5.png
if I comment out the print line then it complains about gotoScene function:
stack overflow stack traceback [C]: in function ‘gotoScene’
image: http://i.imgur.com/BjOZ2.png
now I thought I’d be smart and add a little delay like this:
timer.performWithDelay(500, jumpToMainMenu, 0)
so perhaps then corona would manage to go back to mainmenu scene, and this is what happens after I run with that modification:
mainmenu enterScene and exitScene are repeatedly called and get in and endless loop.
I can provide code if needed, however I used a barebones templates to test this as I was experiencing this problem in game I’m developing so just to exlcude my game code doing something funny I set up this experiment and found it failed.
Can someone explain if this is a bug or is there workaround this? I need to be able to go to mainmenu after closing popup and it seems as it is right now corona can’t handle that.
How does rest of you do this? I’m thinking perhaps making my own popup instead of using coronas since it seems not to work perfectly. [import]uid: 13099 topic_id: 30159 reply_id: 330159[/import]