Hi Guys,
I'm new to Krpano. I been trying to make a dynamic created Hotspot draggable but can't found any help...
please guide me.
Please also do guide me how can I download the Editor Plugin.
Below is the funcation I'm using to create a hotspot
Thanks
function add_hotspot()
{
if (krpano)
{
var h = krpano.get("view.hlookat");
var v = krpano.get("view.vlookat");
var hs_name = "hs" + ((Date.now() + Math.random()) | 0); // create unique/randome name
krpano.call("addhotspot(" + hs_name + ")");
krpano.set("hotspot["+hs_name+"].url", "assets/krpano_plugins/hotspot.png");
krpano.set("hotspot["+hs_name+"].ath", h);
krpano.set("hotspot["+hs_name+"].atv", v);
if ( krpano.get("device.html5") )
{
// for HTML5 it's possible to assign JS functions directly to krpano events
krpano.set("hotspot["+hs_name+"].onclick", function(hs)
{
alert('hotspot "' + hs + '" clicked');
}.bind(null, hs_name));
}
else
{
// for Flash the js() action need to be used to call from Flash to JS (this code would work for Flash and HTML5)
krpano.set("hotspot["+hs_name+"].onclick", "js( alert(calc('hotspot \"' + name + '\" clicked')) );");
}
}
}