You are not logged in.

> The forum rules have been updated. Please take a moment to read them.


#1 2012-08-15 21:29:58

olioli
New member
Registered: 2012-08-15
Posts: 2

Can I change certain properties through javascript?

Hello everyone, I was wondering if there's any way to control certain properties through javascript and pass it into the xml?

For example
        <script>
  var viewer = createPanoViewer({swf:"build.swf",target:"panoDIV",wmode:"transparent"});
   viewer.addVariable("hotspot[spot0].url", "1.jpg");
   viewer.embed();   
        </script>

And a snapshot of my XML file  build0.xml is

<hotspot name="spot0" onclick="closeallobjects();if(flying == 1.0, flyback(spot0), flyout(spot0) );" url="builddata/graphics/spots/spot0.png" distorted="true" ath="44.0311" atv="-5.2106" width="84" height="8" flying_width="728" flying_height="90" backup_width="84" backup_height="8" flying="0" backup_rx="20.4057" backup_ry="0.409675" backup_rz="-2.24183" rx="20.4057" ry="0.409675" rz="-2.24183" />


For now, I just want to communicate with the xml through Javascript like somehting simple as changing the visible, howevre for me, it's not working at all. The image just appears and no error appears in the console.

Thank you.

Offline

 

#2 2012-08-20 09:26:06

bdd
Administrator
Registered: 2011-01-18
Posts: 622
Website

Re: Can I change certain properties through javascript?

Hello,

With the 1.8 version of PTP, you still need to "restrict" your tour to one or some domains to be able to use JavaScript interface.
http://www.autopano.net/wiki-en/action/ … Tour_Build

Gérald

Offline

 

#3 2012-08-22 20:19:00

olioli
New member
Registered: 2012-08-15
Posts: 2

Re: Can I change certain properties through javascript?

Thank you so much Bdd that solved my problem!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson