Brightsign object library, Event loops, Vent – BrightSign HD2000 Object Reference Manual User Manual
Page 7: Oops

i3.DisplayFile(
"museum_ad2.jpg"
)
endif
r=CreateObject(
"roRectangle"
, 1520, 50, 300, 100)
res=CreateObject(
"roResourceManager"
,
"resources.txt"
)
c=CreateObject(
"roClockWidget"
,r, res,
true
)
c.Show()
r=CreateObject(
"roRectangle"
, 60, 900, 1800, 100)
t=CreateObject(
"roTextWidget"
, r, 3, 0, 5)
t.SetForegroundColor(&ha0a0a0)
t.PushString(
"The next Museum tour will be starting at 2:30pm in
the lobby."
)
t.PushString(
"Visit the Museum Store today for 15% all
purchases."
)
t.PushString(
"Become a museum member and today's visit is free."
)
t.PushString(
"BrightSign solid-state media players power
interactive video exhibits with simplicity, reliability and
interactivity to high-impact digital signage. Learn more at
www.roku.com/brightsign."
)
t.Show()
p=CreateObject(
"roMessagePort"
)
sw = CreateObject(
"roGpioControlPort"
)
sw.SetPort(p)
msg_loop:
msg=wait(0,p)
if
type(msg)=
"roGpioButton"
then
if
debug
AND
msg=12
then
'Video Select
end
endif
else
"Unknown event "
; type(
event
)
endif
goto
msg_loop
BrightSign Object Library
This section specifies each of the Roku Objects that are included with BrigthScript.
Event Loops
When creating anything more than a very simple script, an Event Loop will need to be created. An Event
Loop typically has this structure:
1. wait for the event
2. process the event
3. jump back to 1
Events are things like a button press, a timer that has triggered, a video that has finished playing back, etc.
7