Hi,
I`m building a tour using the scene tags. For several reasons i had to store the scenes in multiple xml files. Each xml represents a level in a building, so I've got
different thumbs and different maps for each xml file. So far so good - but now I would like to use Klaus' prev next buttons example.
So the problem with this example is that as soon as i go to another level in the building, meaning opening another xml, the scenes in this xml are also used for the prev/next action when i go back to the start-scene.
It looks like krpano stores all the scenes in the ram, independent from the xml which contain them.
Is there any solution for this, so that the prev/next actions include only the scenes from the current xml?
Thank in advance & regards
Michael
Code of Klaus' example:
|
Source code
|
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
|
<action name="prevscene">
if(%1 != findnext, sub(i,scene.count,1));
txtadd(scenexml,'<krpano>',get(scene[%i].content),'</krpano>');
if(scenexml == xml.content,
dec(i);
if(i LT 0, sub(i,scene.count,1));
loadscene(get(scene[%i].name), null, MERGE, BLEND(1));
,
dec(i);
if(i GE 0, prevscene(findnext));
);
</action>
<action name="nextscene">
if(%1 != findnext, set(i,0));
txtadd(scenexml,'<krpano>',get(scene[%i].content),'</krpano>');
if(scenexml == xml.content,
inc(i);
if(i == scene.count, set(i,0));
loadscene(get(scene[%i].name), null, MERGE, BLEND(1));
,
inc(i);
if(i LT scene.count, nextscene(findnext));
);
</action>
|