Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

how hide one dialog and show .another dialog

i want to hide one dialog and show another dialog but i did dose not work ,
first, i call displayProcessDialog function and then i call showPurchaseDialog function but it's not work
 here is my code ,anyone know how to do ? 

sub displayProcessDialog(title="You need subscribe this channel, wait a moment please ...")
  ' ProgressDialog
  progressdialog = createObject("RoSGNode","Dialog")
  progressdialog.backgroundUri = "pkg:/images/dialog_bg.9.png"
  ' progressdialog.title = title
  progressdialog.title = "Subscription"
  ' progressdialog.optionsDialog = true
  progressdialog.message = "You need subscribe this channel"
  progressdialog.buttons=["Subscriptibe to xxxxx $9.99"] = progressdialog

  m.timer = createObject("RoSGNode","Timer")
  m.timer.duration = 50
  m.timer.control = "start"
end sub

function showPurchaseDialog()
  purchasedialog = createObject("RoSGNode","ProgressDialog")
  purchasedialog.backgroundUri = "pkg:/images/dialog_bg.9.png"
  purchasedialog.title = "Purchasing subscription..."
  ' = purchasedialog
  ' purchasedialog.close = false
end function
0 Kudos