You are not logged in.

1

Monday, December 16th 2013, 2:45pm

Hotspot with multiple action

Hello!

I'm creating indoor panorama with hotspots.
Panorama contains doors and another objects.

Here is what i need:
By clicking the door for the first time a would like to open it.
With the second click i would like to close it.

<hotspot name="door" capture="false" handcursor="false" alpha="0"
url="door_open.jpg"
distorted="true" zorder="2"
onloaded="calc_pos_from_hfov_yaw_pitch_roll(33, 178.216, -30.327, 2.214);"
onclick="tween(alpha,1);"
/>

First click works. How to implement the second click?

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

2

Monday, December 16th 2013, 2:51pm

Try "switch();" action. See here:

http://krpano.com/docu/actions/#switch

So the code would be:

Source code

1
onclick="switch(alpha, 0, 1);"
Regards,

Alexey

3

Monday, December 16th 2013, 2:53pm

Great, it works!
Алексей, спасибо :)

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

4

Monday, December 16th 2013, 2:56pm

Да не за что ;-)
Regards,

Alexey