HomefieldOfView | SPi-V dev

Navigation

user

Spotter online

Hello

Is there a way to create spotter online?
I want to read (and copy) pan/tilt/fov in internet browser (I don't need a crosshair, grid and anything).

I guess it should be a dcr file (like SPi-V.dcr) with implemented text field which displays those parameters, and with a capability to load any xml/image as a regular SPi-V.dcr.

Can anyone help with that thing?

Re: Spotter online

If you own a copy of Director, it is pretty easy to make something like that. See the article on using SPi-V in Director.

Re: Spotter online

Yes, I have, and I was trying, but I don't know director too much.

I've downloaded integration advanced and modyfied, so I have coordinates displayed where I want, but I can't open external xml specyfied in attribute in html.

Ps. How to put " to string? Normally it's \" but in Director it doesn't work...

UPDATE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I was trying harder and ;) :
- I don't need to know how to put " to string ;)
- I've made something like spotter, but it works offline, on server coordinates aren't passed to text field.

Here is my project:
spotter.dir
spotter.dcr

Here is what I did (I was working on integration-advanced):
- changed a little text field to display pan tilt and fov
- changed LoadPanorama behavior to load file specyfied in swURL parameter
- added a Copy behavior to simply copy coordinates on clicking text field

As I was saying, locally it works fine, but not on server (I put spotter.dcr next to SPi-V.dcr and as src parameter I put spotter.dcr).

Can anyone tell me what is wrong?

Thanks in advance!

Re: Spotter online

If you upload an actual page, it is a lot easier for me to see what is going on. As it is, spotter.dcr tells me it can't find SPi-V.dcr

Re: Spotter online

Actual page:
http://www.pimpek.lama.net.pl/spi/spotter/

Data to watch locally
spotter.zip

Hope those files will help to find what's wrong...

Re: Spotter online

Thanks, that helps. I found the bug in my code:

In the "get pan" behavior, change the getSPV handler:

on getSPV me
  repeat with tSpriteNum = 1 to the lastChannel
    if sprite(tSpriteNum).member.type = #movie and sprite(tSpriteNum).filename contains "SPi-V.dcr" then
      tSPV = tSpriteNum
      exit repeat
    end if
  end repeat

  return tSPV
end

furthermore it your exitFrame handler could be a little more efficient:

on exitFrame me
  if voidP(pSPV) then
    pSPV = me.getSPV()
  else
    tell sprite(pSPV)
      tPan = getProperty("_camera", "pan")
      tTilt = getProperty("_camera", "tilt")
      tFov = getProperty("_camera", "fov")
    end tell
  end if
end

Re: Spotter online

With a litle modyfication works great!

...
if sprite(tSpriteNum).member.type = #movie and sprite(tSpriteNum).member.filename contains "SPi-V.dcr" then
...

Thanks!