Thanks. I will upgrade asap
I'm sorry, I didn't receive the notification. krpano version is 1.17.pr2 (build 2014-01-10). Source code 1 <events onnewscene="js( grabnewscene() );"/> grabnewscene is a global variable function. It grabs other events (e,g, onviewchange) but onnewscene never is emitted.
I'm using krpano 1.17 with the HTML5 viewer. It's been already reported by another user that the onnewscene event isn't triggered (my code is correctly triggered by other events like onmousedown). Is there any other way to be informed of scene changes? I need to do some action (in my javascript code) whenever the user click on a hotspot to change scene. Thanks for you precious help, Giovanni
I confirm that onnewscene is not working for me too. I need to register JS functions and scene changes (through hotspots) and I don't know how to do it without that event
Thanks for the help, but it doesn't work with lower case neither. Should I define some more parameter when I define the plugin? Source code 1 <plugin name="myplugin" url="myplugin.js" parent="" preload="true" x="0" y="0" visible="true" keep="true"/> I use the krpano obtained from "krpanoSWFObject" Source code 1 krpano = document.getElementById('krpanoSWFObject');krpano.call("plugin[myplugin].attachevents()"); PS: does the HTML5 viewer use SWF under the cover?
My fault, I meant pluginobject in my first code snippet. Calling with Source code 1 krpano.call("plugin[myplugin].attachEvents()"); didn't work wither. I've completely rearranged my plugin. Now I instantiate it by myself, passing the krpano object to it . Far more flexible and easy to manage ;) Thanks anyway.
I have a Javascript plugin for the HTML5 viewer. I need to call its methods from outside krpano. What's the right way to do it? In my plugin I do: Source code 1 2 3 4 local.registerplugin = function (krpanointerface, pluginpath, pluginobject) { plugin.attachEvents = attachEvents; } function attachEvents() {alert('attached');} then I've tried calling: Source code 1 krpano.call("attachEvents();"); and Source code 1 krpano.call("plugin[myplugin]attachEvents"); but notghin happens.