Forum Discussion
5 Replies
- RokuChrisRoku Employee
- RokuJoelBinge WatcherYes. You could use msg=wait(600000,port) or you could set up a timer:
timer=createobject("roTimeSpan")
timer.mark()
While True
msg=port.getmessage()
if timer.totalseconds() > 600 then
content.starRating=checkStarRating()
timer.mark()
screen.setcontent(content)
end if
if type(msg)="roSpringboardScreenEvent" then
if msg.isbuttonPressed() then
if msg.getindex() = 0 then
playContent(content)
else if
... - alexboyerVisitorAh so you can check for multiple event types within the same while loop? Nice. Thanks!
- RokuJoelBinge WatcherYes. There may be some instances where it works better to use a separate port and if/then statement, specifically if you have an roScreen and async roURLTransfers, probably best if they are each on their own port.
- Joel - alexboyerVisitorWanted to let you know that suggestion worked very well. Thanks Joel!