Hi,
the 'passQueryParameters' call will passen the given parameters from the html file to the viewer,
e.g. instead of:
|
Source code
|
1
|
index.htm?scenetoload=pano5
|
and
|
Source code
|
1
|
viewer.passQueryParameters();
|
you could do also:
|
Source code
|
1
|
viewer.addVariable("scenetoload", "pano5 ");
|
and when doing that you will have a variable called 'scenetoload' in the krpano xml,
so in the xml you can use them to load the right scene,
e.g. do this check in the onstart event or an action that was called from there:
|
Source code
|
1
2
3
4
5
6
7
|
if(scenetoload !== null,
<!-- the scenetoload variable is set, so load the given scene -->
loadscene(get(scenetoload),null,MERGE);
,
<!-- else load the default first scene -->
loadscene(get(scene[0].name),null,MERGE);
);
|
best regards,
Klaus