Hi,
I'm using the Klaus testhotspot action to select hotspots when they are in the middle of the screen (to use with a Leap Motion).
It works but I have a small issue to set them to the onover state.
Sometimes it works perfect, and sometimes they switch from onover to onout very quickly even if they are still in the middle of the screen, and the hovering state is still on true...
here is my code :
Code
<events name="testshotspots" keep="true" onviewchanged="testhotspots();"/>
<action name="testhotspots">
for(set(i,0), i LT hotspot.count, inc(i),
getlooktodistance(d, hotspot[get(i)].ath, hotspot[get(i)].atv);
if(d LT 8,
highlight_hotspot(get(i), get(hotspot[get(i)].name));
,
background_hotspot(get(i), get(hotspot[get(i)].name));
);
);
</action>
<action name="highlight_hotspot">
if(hotspot[%1].ishighlighted != true,
set(activehotspot,%2);
set(hotspot[%1].ishighlighted, true);
callwith(hotspot[%2], onover);
callwith(plugin[%2], onover);
set(plugin[%2].hovering, true);
);
</action>
<action name="background_hotspot">
if(hotspot[%1].ishighlighted,
set(hotspot[%1].ishighlighted, false);
callwith(hotspot[%2], onout);
callwith(plugin[%2], onout);
set(plugin[%2].hovering, false);
set(activehotspot,null);
);
</action>
<hotspot name="sainte_marie" ath="89.352" atv="4.079" style="trait"/>
<plugin name="sainte_marie"
style="tospot"
parent="hotspot[sainte_marie]"
tooltip="
[font color='#cba934' size='26' style='font-size:26px; text-align:center' align='center']Chapelle Sainte-Marie[/font][br]
L’ancienne chapelle de l’hospice Sainte-Marie est construite vers 1850. Composée d’un portique d’entrée d’inspiration antique elle est surmontée d’un dôme et renferme un remarquable ensemble de peintures murales."
onclick="looktohotspot(get(name) , 5, smooth(25,50,25));loadpano(sainte_marie.xml, null, MERGE, BLEND(2))"
/>
Display More
any ideas ?