BrightSign Object Reference Manual (FW 5.1) User Manual

Page 127

Advertising
background image

119

•

SetMode(a As String) As Boolean

•

NotUsed2(a As Boolean) As Boolean

The roTouchScreen interface sends events of type roTouchEvent, which provides the following:

•

ifInt: The userid of the touched region.

•

ifPoint: The

x,y coordinates of the touch point. This interface is not normally needed. ifPoint has two member

functions:

GetX As Integer and GetY As Integer.

•

ifEvent: The mouse events. ifEvent has one member function:

GetEvent() As Integer.


Example
: This code loops a video and waits for a mouse click or touchscreen input. It outputs the coordinates of the click
or touch to the shell if it is located within the defined region.
v=CreateObject("roVideoPlayer")
t=CreateObject("roTouchScreen")
p=CreateObject("roMessagePort")

v.SetPort(p)
t.SetPort(p)
v.SetLoopMode(1)
v.PlayFile("testclip.mp2v")

t.AddRectangleRegion(0,0,100,100,2)

loop

:

msg=Wait(0, p)
print "type: ";type(msg)
print "msg=";msg

if

type(msg)="roTouchEvent"

then

Advertising