Set hotspot hovering from javascript

  • Hi, I would like to set a hotspot onover from javascript, so I did it this way :

    Code
    function krpano() 
    	{
    		return document.getElementById("krpanoSWFObject");
    	}
        
    	function nextfiche(myhotspot)
    	{
    		krpano().call("looktohotspot(" + myhotspot + ", 2, smooth(50,100,30))");
    		krpano().set("hotspot[" + myhotspot + "].hovering, true");
    	}


    But it doesn't work...
    I also tried

    Code
    krpano().call("callwith(hotspot[" + myhotspot + "], onover");

    without success...
    Any idea ?

  • hovering attribute is read only to know if the cursor is "hover".
    Perhaps try to change the enabled to false and true when activated or not and call the onover(); or onhover(); action of the hotspot ? As your callwith test.
    Try also with an internal krpano action

    Code
    <action name="changeHotspotOnHover">hotspot[%1].onover();</action>

    called from the js part

    Code
    krpano().call("changeHotspotOnHover("+myhotspot+")");

Participate now!

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