Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
btpoole
Channel Surfer

Close BusySpinner After Data Load

Using the busyspinner example in the sdk but having some difficulty in getting it right. When channel starts the busyspinner comes up and runs but never goes away to allow contents to show. I have something like the following. I know this might be simple fix but not able to figure it out. How do I make the spinner go away once the serverListdata is done? Thanks


Function serverListdata() as object
showChannelSGScreen()
server0="xxxxx"
server1="xxxxx"
server2="xxxxx"
m.serverList[0]= server0
m.serverList[1]= server1
m.serverList[2]= server2
?"SERVER INDEX IS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"index
m.serverList=m.serverList[index]
end function

sub showChannelSGScreen()
screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
screen.setMessagePort(m.port)
scene = screen.CreateScene("BusySpinnerExample")
screen.show()
while(true)
msg = wait(0, m.port)
msgType = type(msg)
if msgType = "roSGScreenEvent"
if msg.isScreenClosed() then return
end if
end while
end sub

0 Kudos