So it would be terrific if we could catch the coordinates of the (visitors) mouse pointer when clicked after an event (e.g. clicking a ruler button) and send it to a neat little script that would give us the desired results! *cool*
Hi,
that could be already done with a small plugin or javascript code,
e.g.
here is a small plugin that makes the current mouse position accessible via javascript
:
get mouse position
(note the next 1.0.8 beta 9 has this functionality (mouse.x / mouse.y) integrated)
and with the "
screentosphere()" function you can convert this mouse coordinates
to spherical ath/atv coordinates,
e.g.
include the jsmouse.swf plugin in the xml
and do this in javascript
:
|
Source code
|
1
2
3
4
5
6
7
8
9
10
|
var krpano = document.getElementById("krpanoSWFObject");
var mousex = krpano.get("mouse.x");
var mousey = krpano.get("mouse.y");
var hvs= krpano.get("screentosphere("+mousex +","+mousey +")");
var hva= hvs.split(",");
var ath= Number( hva[0] );
var atv= Number( hva[1] );
...
|
best regards,
Klaus