content: 
  
  sub Init()
      ' set background color for scene. Applied only if backgroundUri has empty value
      m.top.backgroundColor = "0x662D91"
      m.top.backgroundUri= "pkg:/images/background.jpg"
      m.loadingIndicator = m.top.FindNode("loadingIndicator") ' store loadingIndicator node to m
      InitScreenStack()
      ShowGridScreenPage()
      RunContentTask() ' retrieving content
  end sub
  
  ' The KeyEvent() function receives remote control key events
  function keyEvent(key as String, press as Boolean) as Boolean
      result = false
      if press
          ' handle "back" key press
          if key = "back"
              numberOfScreens = m.screenStack.Count()
              ' close top screen if there are two or more screens in the screen stack
              if numberOfScreens > 1
                  CloseScreen(invalid)
                  result = true
              end if
          end if
      end if
      return result
  end function
  