22.12.2013 Views

Roku Object Reference - imaginArt

Roku Object Reference - imaginArt

Roku Object Reference - imaginArt

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example:<br />

This script creates 5 zones. The first one contains a video player, the next two contain image players, the<br />

fourth has a clock widget and the last is a text widget. The objects used in this example are explained in<br />

subsequent sections of this document.<br />

debug = true<br />

v=Create<strong>Object</strong>("roVideoMode")<br />

v.SetMode("1920x1080x60i")<br />

EnableZoneSupport(true)<br />

r=Create<strong>Object</strong>("roRectangle", 60, 60, 1386, 800)<br />

v=Create<strong>Object</strong>("roVideoPlayer")<br />

v.SetRectangle(r)<br />

v.SetLoopMode(1)<br />

v.SetViewMode(2)<br />

v.SetAudioOutput(2)<br />

v.PlayFile("Amazon_1080.mpg")<br />

i1=Create<strong>Object</strong>("roImagePlayer")<br />

i1.SetDefaultMode(3)<br />

r=Create<strong>Object</strong>("roRectangle", 100, 100, 285, 123)<br />

i1.SetRectangle(r)<br />

i1.DisplayFile("splash_master.png")<br />

i2=Create<strong>Object</strong>("roImagePlayer")<br />

i2.SetDefaultMode(2)<br />

r=Create<strong>Object</strong>("roRectangle", 1520, 155, 300, 300)<br />

i2.SetRectangle(r)<br />

ok=i2.DisplayFile("museum_ad1.jpg")<br />

if ok=0 then<br />

i2.DisplayFile("museum_ad1.jpg")<br />

endif<br />

i3=Create<strong>Object</strong>("roImagePlayer")<br />

i3.SetDefaultMode(2)<br />

r=Create<strong>Object</strong>("roRectangle", 1520, 565, 300, 300)<br />

i3.SetRectangle(r)<br />

ok=i3.DisplayFile("museum_ad2.jpg")<br />

if ok=0 then<br />

i3.DisplayFile("museum_ad2.jpg")<br />

endif<br />

r=Create<strong>Object</strong>("roRectangle", 1520, 50, 300, 100)<br />

res=Create<strong>Object</strong>("roResourceManager", "resources.txt")<br />

c=Create<strong>Object</strong>("roClockWidget",r, res, true)<br />

c.Show()<br />

r=Create<strong>Object</strong>("roRectangle", 60, 900, 1800, 100)<br />

t=Create<strong>Object</strong>("roTextWidget", r, 3, 0, 5)<br />

t.SetForegroundColor(&ha0a0a0)<br />

t.PushString("The next Museum tour will be starting at 2:30pm in<br />

the lobby.")<br />

t.PushString("Visit the Museum Store today for 15% all<br />

purchases.")<br />

t.PushString("Become a museum member and today's visit is free.")<br />

6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!