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
|
<krpano onstart="action(startup)">
<action name="startup">
<!-- create a variable - "currentpano" - this is the number of the current pano -->
set(currentpano,1);
action(loadpanos);
</action>
<action name="loadpanos">
<!-- depending on the "currentpano" variable load a pano -->
if(currentpano == 1, loadpano(pano1.xml, null, MERGE, BLEND(1)) );
if(currentpano == 2, loadpano(pano2.xml, null, MERGE, BLEND(1)) );
if(currentpano == 3, loadpano(pano3.xml, null, MERGE, BLEND(1)) );
if(currentpano == 4, loadpano(pano4.xml, null, MERGE, BLEND(1)) );
</action>
<action name="prevpano">
dec(currentpano, 1, 1,4);
action(loadpanos);
</action>
<action name="nextpano">
inc(currentpano, 1, 4,1);
action(loadpanos);
</action>
<plugin name="nextbutton" url="..." ... keep="true" onclick="action(nextpano);" />
<plugin name="prevbutton" url="..." ... keep="true" onclick="action(prevpano);" />
</krpano>
|