Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

Going to an specific scene
Started by novelda76 Jan 10 2019 02:56 AM

1 reply to this topic
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 14 posts
  • Corona SDK

Hi, my app have five scenes called "scene1", "scene2", "scene3, "scene4", "scene5". In every scene I have a button to go to an scene called "menu_scene". Also, inside "menu_scene", I have two sections called "credits_scene" and "aboutUs_scene", which are also scenes.


I have a button in the "menu_scene" to go to previous scene. So if someone is inside "scene1" goes to "menu_scene" and then goes to "credits_scene", and then back to "menu_scene", my prevScene button takes again to "credits_scene". Can i handle the prevScene button to go to "scene1" and not to any section of the menu?


I hope I have explained this as best I can. 



[TOPIC: post.html]

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,697 posts
  • Enterprise

You probably need to share your previous scene handling code so developers can advise you. If you're using composer.getSceneName("previous") then it's not going to behave the way want since it literally will get the previous scene, not some arbitrary scene. Instead you're going to need to keep track of your own "previousScene" variable and not set it when you go to credit_scene or other side scenes.