How to change scenes

I’ve setup my game to flow like this so it changes from main to menu then you click play and go to game then when you die you go back to the menu

Main—menu-----game-----menu

But it won’t let me go back to the menu.lua from game.lua because I was just on the menu so it won’t let me change back the scene I was just on so I’m going to use a cut scene method like so

Main----menu—cut1----game----cut2----menu----cut1-----game-----cut2----menu and so on

But how would I go about doing the scenes cut1 and cut2 I know how to set the file up but would I need any lines of code that remove everything from the previous screen or is I as simple as just storyboard.gotoscene (“menu”) ?

Well, there is probably an issue with your code, because composer definitely lets you go back and forth between two scenes.

Please take a look at the framework in this bundle of code (see folder 5_frame):

http://github.com/roaminggamer/CoronaGeek/raw/master/Hangouts/composer_scene_manager.zip

You might want to check out this tutorial:

https://coronalabs.com/blog/2015/04/14/tutorial-the-basic-game-template/

Rob

Well, there is probably an issue with your code, because composer definitely lets you go back and forth between two scenes.

Please take a look at the framework in this bundle of code (see folder 5_frame):

http://github.com/roaminggamer/CoronaGeek/raw/master/Hangouts/composer_scene_manager.zip

You might want to check out this tutorial:

https://coronalabs.com/blog/2015/04/14/tutorial-the-basic-game-template/

Rob