HomefieldOfView | SPi-V dev

Navigation

user

HowTo control tour/scene from outside the embedded SPi-V object

Hi,

I am having a tour with several panos and want to control the tour from outside the SPi-V object. i.e. if I press a button 'load pano0' i want to make the running SPi-V instance changing the pano as rquested.

See:
http://home.arcor.de/birgit_helge/spiv/tourcontrol.html

I am trying to make it with the code below:
Any suggestions?

Thx,
Helge

<object width="400" height="200" classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000"   codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"
   name="PanoViewer" id="PanoViewer">
    <param name=src            value="dswmedia/SPi-V.dcr">
    <param name=swURL          value="main.xml">
    <param name=swStretchStyle value="stage">
    <param name=swRemote       value="swContextMenu='FALSE'">
    <param name=progress       value="true">
    <param name=logo           value="false">

    <embed width="400" height="200" type="application/x-director"
            pluginspage = "http://www.macromedia.com/shockwave/download/"
          src="dswmedia/SPi-V.dcr" swURL="main.xml"
          swStretchStyle="stage" swRemote="swContextMenu='FALSE'"
          progress="true" logo="false" bgColor=""
          swLiveconnect="true" name="PanoViewer">
    </embed>
  </object>
  <br>
<input title=" Load Pano0 " type="button" value="Pano0" onclick="document.PanoViewer.EvalScript('setView("scene0","90","1","70")');">
<input title=" Load Pano1 " type="button" value="Pano1" onclick="document.PanoViewer.EvalScript('setView("scene1","90","1","70")');">

Re: HowTo control tour/scene from outside the embedded SPi-V obj

You have an 'unterminated string' error in your html.

onclick="document.PanoViewer.EvalScript('setView("scene0","90","1","70")');"

should be something like
onclick="document.PanoViewer.EvalScript('setView(\"scene0\",\"90\",\"1\",\"70\")');"

The additional \ characters tell the browser that the following character (") should be taken as is, and not as an end for the string.

Changing this will likely fix it for Internet Explorer, but not for Firefox or Safari. If you want to achieve this in all major browsers, you are going to have to send the commands to a small Flash movie, which in turn sends it to SPi-V over a LocalConnection. SPi-V currently listens on the LocalConnection 'port' named 'spv.engine'. I have been meaning to put together a generic HTML to SPi-V bridge, but I have not yet sat down long enough with Flash to do this.

Re: HowTo control tour/scene from outside the embedded SPi-V obj

Hi Aldo,

thank you. I will try this. I am working on an 'gallery' output for JATC,I think this feature will be helpfull for this.

rgds,
Helge

Re: HowTo control tour/scene from outside the embedded SPi-V obj

Aldo,
I did it. I managed it to make flash movie with buttons setting the view via LocalConnection. Now I have to make it nice and embed in JATC. I will post the solution here if its ready for public.

rgds,
Helge