I'm working on my own plugin and I encountered a problem. I would like to handle krpano events like 'onnewpano, onloadcomplete etc.' How can i do that ? Is this possible?
local.registerplugin = function(krpanointerface, pluginpath, pluginobject)
{
krpano = krpanointerface;
plugin = pluginobject;
...
// create a new <events> element with a name based on the plugins name
var events = krpano.events.createItem(plugin.name + "_events");
// use the same keep setting as the plugin
events.keep = plugin.keep;
events.onnewpano = function()
{
...
}
events.onloadcomplete = function()
{
...
}
...
}