screen.AllowUpdates(true)
screen.SetContent(show)
screen.show()
if msg <> invalid
if msg.isPartialResult()
shouldPlaylistExit = true
else if msg.isScreenClosed()
print "Screen closed"
exit while
print "Screen closed"
screen.SetContent(show)
'screen.SetContent(0)
'screen.SetContent()
exit while
"dynamitemedia" wrote:
i just want to refresh to see the or not see the "resume playing" button
I tried using the setContent and it didnt work. i already tried:print "Screen closed"
screen.SetContent(show)
'screen.SetContent(0)
'screen.SetContent()
exit while
and got nothing but errors, could you show me what i should add and where cause i am obviously not understanding or missing something.
There should be .AddButton code somewhere in your code. You'd need to call that again and have it clear the current buttons and re-add the appropriate ones based on the status you want displayed (i.e., "Play" instead of "Resume"). The refreshShowDetail() function in the appDetailsScreen.brs in the videoplayer example does this. You'd just need to change it to conditionally add either a Play or Resume button, instead of just the Resume button as it does now.
Function showDetailScreen(screen As Object, showList As Object, showIndex as Integer) As Integer
.
.
showVideoScreen(showList[showIndex])
resetButtons(screen)
.
.
End Function
Sub resetButtons(screen)
screen.ClearButtons()
If ... Then
screen.AddButton(1, "resume playing")
screen.AddButton(2, "play from beginning")
Else
screen.AddButton(2, "play")
End If
End Sub
"RokuChris" wrote:
Making your call to SetContent() in the video screen's event loop will cause problems because the screen variable in that context is your video screen, not your springboard. You should wait to call SetContent() untill you have exited the video screen's event loop and control has returned to the springboard's event loop.