I'm asking a very dumb question I know. But I tried many ways but did not get the correct solution for this. My Question is How to close and open a new Scene inside of the main My Code is :
sub StartSGDEXChannel(componentName, args)
m.screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
scene = m.screen.CreateScene(componentName)
scene.launch_args = args
msg = Wait(0, m.port)
msgType = Type(msg)
?"SGDEX :: msgType : "msgType
if msgType = "roSGScreenEvent"
if msg.IsScreenClosed() then return
else if msgType = "roSGNodeEvent"
field = msg.getField()
data = msg.getData()
if field = "exitChannel" and data = true then
'Here I'm trying to do close the Main Scene and Open a new Scene.
'I write below line it's close whole App
'I created one Sperate component and tried But it's not Working
m.scene = m.screen.CreateScene("SampleExample")
Anyone, Please suggest or guide me on how to do this type of thing in Roku?