Plugin Capture=false blocking mouse events to hotspots and other plugins

  • I have been experimenting with the autorotate feature. I wanted to set enabled=false when the user interacts with the tour, but I could not find any mouse events for the krpano player, only for plugins. So I created a transparent image to make a plugin with capture=false to catch mouse events so I could set autorotate.enabled=false. This mostly works since I can move the pano with the mouse, but hotspots and other plugins with a lower zorder are not responding to mouse events. This happens whether I use a swf or a transparent image as the plugin.

    I've temporarily fixed this by disabling the plugin when it has been clicked. But I think it would be useful to have a plugin that can respond to all mouse events without blocking lower order plugins and hotspots. This would let me write plugins and actions that can respond to mouse actions on the whole screen as opposed to specific spots. But setting capture=false does not entirely work, since hotspots and other plugins don't receive the mouse events. Is there some way I can get and pass mouse events?

  • I may misunderstand how you want the autorotate to work... but you don't have to set a mouse event to stop the autorotation... it will stop rotating as soon as the pano is interacted with. You can set the "waittime" for a longer time if it's starting back up too fast.

    reference: http://www.krpano.com/docu/xml/#autorotate

    Unfortunately... the capture true / false... only refers to the single plugin and the pano.

    There are mouse events for the overall stage... beta 7 got some new ones that might be more what you are looking for (like the onidle or onclick)... http://www.krpano.com/forum/wbb/inde…D=2598#post2598

  • Hi - not sure, if i really understand the question but:

    THERE IS a mouse-event for the pano itself:

    onclick="whattodoonclickaction"

    In my latest demotour i used it to stop autorotate if the pano is only clicked - the user would not expect to have to move thg for stopping autorotate...

    in the event tag of krpano i defined:

    onclick="set(autorotate.enabled, false);"
    onidle="set(autorotate.enabled, true);"

    you only heve to define the autorotate and the idletime to use.

    Edit: --> just recognized: autorotate doesent start "onidle" again; have to clean this, BUT it stoppes as expected...

  • Pan, thanks. I didn't see it in the documentation, but I'll have to give it a try.

    Graydon, I want to be able to completely disable the autorotate once the user interacts, not simply pause it. I do have a solution, but it's not elegant. I'll have to give Pan's suggestion a try.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!