22.12.2013 Views

Roku Object Reference - imaginArt

Roku Object Reference - imaginArt

Roku Object Reference - imaginArt

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• 12 to 13 - Comb effect vertical and horizontal<br />

• 14 - Fade out to background color then back in<br />

• 15 - Fade between current image and new image<br />

• 16 to 19 - Slides from top, bottom, left and right<br />

To display images in a zone, SetRectangle() must be called. EnableZoneSupport() must be<br />

included in a script to use the zones functionality.<br />

Here are some example shell commands you can try to test the different display modes:<br />

<strong>Roku</strong>> image filename.bmp 0<br />

<strong>Roku</strong>> image filename.bmp 1<br />

<strong>Roku</strong>> image filename.bmp 2<br />

<strong>Roku</strong>> image filename.bmp 3<br />

<strong>Roku</strong>> image filename.bmp 0 0 0<br />

<strong>Roku</strong>> image filename.bmp 2 0 0<br />

This example script uses preloaded images to improve the UI speed when the user hits a key on the<br />

keyboard. As soon as the keyboard is hit, then the display switches to the new image which has already<br />

been preloaded. The only delay is if the key is hit whilst the image is pre-loading - as soon as the image is<br />

loaded, it will then display.<br />

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

p = Create<strong>Object</strong>("roMessagePort")<br />

k = Create<strong>Object</strong>("roKeyboard")<br />

k.SetPort(p)<br />

i.PreloadFile("one.bmp")<br />

loop:<br />

i.DisplayPreload()<br />

i.PreloadFile("two.bmp")<br />

wait(0,p)<br />

i.DisplayPreload()<br />

i.PreloadFile("one.bmp")<br />

wait(0,p)<br />

goto loop<br />

roImageWidget can be used in place of roImagePlayer for the case where the image is displayed within a<br />

rectangle.<br />

When displaying roImagePlayer within a rectangle, the following code is used:<br />

rectangle = Create<strong>Object</strong>("roRectangle", 0, 0, 1024, 768)<br />

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

i.SetRectangle(rectangle)<br />

When using an roImageWidget, the following code is used:<br />

rectangle = Create<strong>Object</strong>("roRectangle", 0, 0, 1024, 768)<br />

i = Create<strong>Object</strong>("roImageWidget", rectangle)<br />

Using an roImageWidget can result in more pleasing esthetics on image player creation. Beyond this, an<br />

roImageWidget behaves identically to an roImagePlayer as it implements the ifImageControl interface.<br />

24

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

Saved successfully!

Ooh no, something went wrong!