Tue Feb 10, 2009 11:08 am
Hey Lyndon,
Thanks for getting back to me so soon. I've included my code, which just goes from one video to another via simple touches. One question I have on the ClearRegion command is how do you (or can you) specify a particular hotspot? If so, does one put the userid of the touchspot into the brackets at the end of the ClearRegion command? Regardless....here's my code (be gentle....I've just started with BrighScript..ha..ha):
vid=CreateObject("roVideoPlayer")
aud=CreateObject("roAudioPlayer")
vmd=CreateObject("roVideoMode")
tch=CreateObject("roTouchScreen")
v=CreateObject("roMessagePort")
a=CreateObject("roMessagePort")
t=CreateObject("roMessagePort")
vmd.SetMode("1024x768x60p")
vid.SetAudioOutput(0)
vid.MapStereoOutput(2)
vid.SetPort(v)
aud.SetPort(a)
tch.SetPort(t)
vid.SetViewMode(0)
Main:
tch.AddRectangleRegion(113,255,149,513,1)
vid.PlayFile("\Untitled.mpg")
repeatt1:
touch=wait(0,t)
touch1=touch.GetInt()
if touch1 = 1 then
vid.Stop()
'tch.ClearRegion(1)
goto cabinet
endif
goto repeatt1
cabinet:
tch.AddRectangleRegion(512,384,200,200,2)
vid.PlayFile("\filecab.mpg")
repeatt2:
touchc = wait(0,t)
touch2 = touchc.GetInt()
if touch2 = 2 then
vid.Stop()
'tch.ClearRegion(2)
goto Main
endif
goto repeatt2
Please note that the program is not perfect but I just threw it up to test the ClearRegion command. I've also included it into other programs, with the same negative results. Again, I tried the command without the final brackets, with the brackets containing no value and with brackets and userid value.....same error message. Thanks in advance for your efforts folks...the support is really appreciated.