i cut out a lot of the clutter but my code in a nutshell is this;
Function Main() as void
loadscreen = CreateObject("roScreen" , true)
if m.device.legacy = true then
loadscreen.SetPort(port)
else
loadscreen.setmessageport(port)
end if
loadscreen.setalphaenable(true)
loadscreen.Clear(&h00000000)
while (true)
loadscreen.Clear(&h00000000)
loadscreen.DrawObject(stuff)
loadscreen.DrawText(stuff)
loadscreen.SwapBuffers()
msg=port.getmessage()
if type(msg)= "roUniversalControlEvent"
id = msg.GetInt()
if (id = 6)
'***** OK
launchplayer()
end if
end if
end while
End Function
which calls this...
function launchplayer()
playerscreen = CreateObject("roScreen")
port = CreateObject("roMessagePort")
playerscreen = CreateObject("roScreen" , true)
if m.device.legacy = true then playerscreen.SetPort(port) else playerscreen.setmessageport(port)
playerscreen.setalphaenable(true)
while (true)
playerscreen.DrawObject(0,0,images[0])
playerscreen.SwapBuffers()
if viewtimer.totalseconds() >= (60 * 10) then
exit while
end if
msg=port.getmessage()
if type(msg) = "roAudioPlayerEvent"
'print msg
if msg.isStatusMessage() then
print "roAudioPlayerEvent: "; msg.getmessage()
if msg.getmessage() = "end of playlist"
print "end of playlist"
return 0
end if
endif
end if
if type(msg)= "roUniversalControlEvent"
id = msg.GetInt()
'print msg
print msg.GetInt()
if (id = 2) or (id = 0)
exit while
end if
end if
end while
end function
the problem is, when the launchplayer() function is called and exited, it flickers between what was on the roScreen in launchplayer() and the roScreen ran beforehand. It happens on my Roku LT (2400) but not on my Roku 1000. how do I fix that?