Sie sind nicht angemeldet.

nautama

Schüler

  • »nautama« ist der Autor dieses Themas

Beiträge: 82

Wohnort: La Paz, Baja California Sur, México

Beruf: KRpano programmer at www.imagen360.com

  • Nachricht senden

1

Donnerstag, 9. April 2015, 21:46

¿Triggering an action from any layer?

Hello there, I need help triggering an action when clicking over any layer but I don't want to put manually on every layer's ondown event the action because I would like it to run like a plugin which I can save in a different xml and just include it within different tours. Is there any way you can think of to achieve this?, sort of a "ondown" event that works generally over any layer?

Thanks!

2

Samstag, 11. April 2015, 22:22

Just create a style with the ondown event and include it in any layer you want. Like so:

Quellcode

1
2
3
4
5
6
<style name="button"
  ondown="your_actions();"
/>  
<layer name="some_button"
  style="button"
/> 

Hope it helps,
Hernán
My Krpano plugins: Auto Thumbs - Tooltip - Abs

nautama

Schüler

  • »nautama« ist der Autor dieses Themas

Beiträge: 82

Wohnort: La Paz, Baja California Sur, México

Beruf: KRpano programmer at www.imagen360.com

  • Nachricht senden

3

Dienstag, 14. April 2015, 18:33

Thank you very much for the reply, Hernán, the thing is that I don't want to have to go into each layer and edit it with the appropriate style. I would like it to, somehow, make it work from an independent xml, sort of a plugin. I'm guessing I'll have to build a loop that adds the ondown action I want on every single layer of the vtourskin.xml file.