I've attached my code. Pretty straightforward I've read previous articles stating that I can only close a child scene by the parent scene. Is there another way of doing this for the sake of clean code?
<component name = "scene" extends = "Group" initialFocus = "textrectangle" >
<?xml version="1.0" encoding="utf-8" ?>
<script type = "text/brightscript" >
<![CDATA[
sub init()
end sub
function onKeyEvent(key as String, press as Boolean) as Boolean
if press then
if key = "back"
print "destroy window"
m.screen = m.top.findNode("scene")
m.top.removeChild(m.screen)
m.screen = invalid
return true
end if
end if
return false
end function
]]>
</script>
<children>
<Rectangle
id = "textRectangle"
width = "1020"
height = "560"
translation="[0,0]"
color = "0x000000FF" >
<Label
id="text"
height="44"
width="0"
font="font:MediumBoldSystemFont"
text = "Text"
horizAlign = "left"
vertAlign = "center"
translation="[10,520]" />
</Rectangle>
</children>
</component>