Is there a way to listen to onnewpano event (or any other KRpano event available in XML) inside plugin (both Flash and JS)?
Or the only way is to add function to plugin and call it from XML when event fires ?
By now I use a workaround which works but doesn't look very nice.
AS3 code:
Code
var prevOnNewPano:Function = krpano.get("events.onnewpano");
krpano.set("events.onnewpano", function(){(prevOnNewPano!=null)?prevOnNewPano():null; onNewPano();});
private function onNewPano(...rest):void {
.......
}
It creates new function which takes current onnewpano function and adds onNewPano call to it.
I also noticed that onnewpano event doesn't fire if image type is QTVR!