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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
<!-- events -->
<events onnewpano="updatevisitedhs();" />
<!-- actions -->
<action name="startup">
<!-- showlog(); -->
loadscene(get(scene[0].name), null,MERGE,BLEND(1));
</action>
<action name="setvisited">
set(data[%1].content, "true");
</action>
<action name="updatevisitedhs">
set(hsname, "hs_to_");
txtadd(hsname, get(xml.scene));
setvisited(get(hsname));
for(set(i,0), i LT hotspot.count, inc(i),
set(hsname, get(hotspot[get(i)].name));
<!-- trace('name = ', get(hsname), " visited = ", get(data[get(hsname)].content) ); -->
if( get(data[get(hsname)].content),
changetovisited(get(hsname)),
changetonotvisited(get(hsname))
);
);
</action>
<action name="changetovisited">
set(hotspot[%1].url, %BASEDIR%/hotspots/goto-visited.png);
</action>
<action name="changetonotvisited">
set(hotspot[%1].url, %BASEDIR%/hotspots/goto.png);
</action>
<action name="gotoscene">
loadscene(%1, null, MERGE, BLEND(1));
</action>
<!-- goto hotspot style -->
<style
name="gotostyle"
url="%BASEDIR%/hotspots/goto.png"
onclick="gotoscene(get(scenetoload));"
/>
<!-- scenes -->
<scene name="scene1">
........ image
<!-- goto gotspots -->
<hotspot name="hs_to_scene2" style="gotostyle" ath="0" atv="0" scenetoload="scene2" />
<hotspot name="hs_to_scene3" style="gotostyle" ath="20" atv="0" scenetoload="scene3" />
</scene>
<scene name="scene2">
........ image
<hotspot name="hs_to_scene1" style="gotostyle" ath="0" atv="0" scenetoload="scene1" />
<hotspot name="hs_to_scene3" style="gotostyle" ath="20" atv="0" scenetoload="scene3" />
</scene>
<scene name="scene3">
........ image
<hotspot name="hs_to_scene1" style="gotostyle" ath="0" atv="0" scenetoload="scene1" />
<hotspot name="hs_to_scene2" style="gotostyle" ath="20" atv="0" scenetoload="scene2" />
</scene>
|