is this supposed to actually add a hotspot? for example if I click a button it will add a new hotspot to the scene?
addhotspot(newspot);
set(hotspot[newspot].url,spot.png);
set(hotspot[newspot].ath,150);
set(hotspot[newspot].atv,30);
set(hotspot[newspot].scale,0.7);
set(hotspot[newspot].zoom,true);
set(hotspot[newspot].onclick, removehotspot(newspot) );
I tried to use this example from the documentation and I cannot get it to work. I keep getting:
"ERROR: hotspot[newspot] - loading of 'hotspot.png' failed!"
this is the action that I am calling. The image is in the right spot because I am using it in the same scene for hotspots not created dynamically
<action name="addhot2spot">
addhotspot(newspot);
set(hotspot[newspot].url,hotspot.png);
set(hotspot[newspot].ath,150);
set(hotspot[newspot].atv,30);
set(hotspot[newspot].scale,0.7);
set(hotspot[newspot].zoom,true);
</action>
and then something like: onclick="addhot2spot();"
can you point me to a good example of adding a hotspot dynamically?
Thank you