Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

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

1 reply to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

novelda76

[GLOBAL: userInfoPane.html]
novelda76
  • 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. 

 

Thanks



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,371 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.

 

Rob




[topic_controls]
[/topic_controls]