Sie sind nicht angemeldet.

sasky

Anfänger

  • »sasky« ist der Autor dieses Themas

Beiträge: 17

Beruf: Trying to live as anybody else...

  • Nachricht senden

1

Sonntag, 5. Mai 2013, 10:03

Capture scene state or check hotspot click state

Hi all,

I am building small interface for my client in JQuery / JS where I wish to change description when each scene is loaded (onClick or scene change). I do it so with HTML anchor & JS but when user click hotspot it does nothing.

My question is how to capture or check state of hotspot, actually is clicked or not.


Best regards
Martin ;-)

2

Dienstag, 7. Mai 2013, 13:48

Hi,

you can call your own Javascript functions by using the js() action:
http://krpano.com/docu/actions/#js

e.g.
xml:

Quellcode

1
<hotspot ... onclick="js( js_hotspot_click(get(name)) );" />


html/js: (defined at global scope)

Quellcode

1
2
3
4
function js_hotspot_click(hotspotname)
{
  alert("hotspot "+hotspotname+" clicked);
}


Best regards,
Klaus