• Hi
    I'm a complete beginner, as I rely on panotour to do the programming.
    However, I would like to do something that panotour does not provide :

    I make aerial panos of towns, and I want to display future buildings at their exact position.
    To do this, I want the image of a hotspot to show only when one hovers over the hotspot : the image would represent the future, overwriting existing picture.

    I found somewhere that this could be done on a plugin, using the code :
    <plugin name="spot1" visible="true" handcursor="false" url="image.png" onhover="set(plugin[spot1].visible, false);" ... and so on />

    Apparently it doesn't work with a hotspot (i.e. replacing the word "plugin" in the above code with "hotspot")

    Any idea if what I want to do is possible and/or if I did something wrong ?

    Thanks in advance

  • it should work the same with hotspot. did you change the second plugin word?

    <hotspot name="spot1" visible="true" handcursor="false" url="image.png" onhover="set(hotspot[spot1].visible, false);" ... and so on />

  • Yes, I did ; actually the code I typed in my last post is wrong : I swaped false and true :
    the actual code is this, with the full line of code :

    <hotspot name="spot0" handcursor="false" url="panodata/graphics/spots/spot0.png" visible="false" onhover="set(hotspot[spot0].visible,true);" distorted="true" ath="-0.0799518" atv="-0.14331" width="1" height="2" rx="-0.00293835" ry="-179.994" rz="-89.5656"/>
    which doesn't work (nothing is ever displayed)

    if I change the code to this (I remove the first "visible" statement)
    <hotspot name="spot0" handcursor="false" url="panodata/graphics/spots/spot0.png" onhover="set(hotspot[spot0].visible,true);" distorted="true" ath="-0.0799518" atv="-0.14331" width="1" height="2" rx="-0.00293835" ry="-179.994" rz="-89.5656"/>
    it is permanently displayed

    and if I change to this
    <hotspot name="spot0" handcursor="false" url="panodata/graphics/spots/spot0.png" onhover="set(hotspot[spot0].visible,false);" distorted="true" ath="-0.0799518" atv="-0.14331" width="1" height="2" rx="-0.00293835" ry="-179.994" rz="-89.5656"/>
    then the image is displayed until the mouse hovers over. (and never comes back again). It seems that the "visible" variable is defaulted to "true"

    Is there something about onover and onhover that makes things different ? I didn't quite undestand this in the forums, the fact that onhover is executed over and over again until the mouse is no more on the hotspot ?

    (I'm sorry about my vocabulary, last time I wrote some code, it was in "pascal" and that was a long time ago *whistling* . many terms have changed since then.)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!