1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<hotspot name="spot"
url="image.jpg"
distorted="true"
ath="45"
atv="54"
scale="0.5"
rx="-22.5" ry="-26.25" rz="-50.1"
backup_rx="0"
backup_ry="0"
backup_rz="0"
backup_scale="0"
flying="0.0"
onclick="if(flying == 0.0, flyout(), flyback() );"
/>
<!--
flyout/flyback actions
(for more stylish in/out moves play with different tweentypes and times)
-->
<action name="flyout">
<!--
save/backup the current rotation values!
NOTE - it is important that the backup_* variables are predefined!
this allows to save the variables at <hotspot> scope,
if the variables where not predefined, they were saved globally
and this would be a problem when more hotspots are using them!
-->
copy(backup_rx,rx);
copy(backup_ry,ry);
copy(backup_rz,rz);
copy(backup_scale,scale);
<!-- tween the rotations values to 0 for a flat screen view -->
tween(rx, 0);
tween(ry, 0);
tween(rz, 0);
tween(scale, 1.5);
<!--
tween 'flying' to 1.0,
this makes the hotspot independent from the panorama rotation and scaling
-->
tween(flying, 1.0);
</action>
<action name="flyback">
<!-- tween back to the stored backup values -->
tween(rx, get(backup_rx));
tween(ry, get(backup_ry));
tween(rz, get(backup_rz));
tween(scale, get(backup_scale));
<!-- tween 'flying' also back to 0.0 -->
tween(flying, 0.0);
</action>
|