Hi,
first - you need to be sure that the krpano viewer is already loaded and ready,
either make callback from xml to js to inform your javascripts that krpano is ready,
e.g.
xml:
|
Source code
|
1
|
<krpano onstart="js( krpanoready() )">
|
js:
|
Source code
|
1
2
3
4
|
function krpanoready()
{
...
}
|
or check in js if there is already a "set" function and if not wait and try again:
e.g.
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
function dostuff()
{
kp=document.getElementById('krpanoSWFObject');
if(kp.set)
{
kp.set(...);
}
else
{
setTimeout( dostuff(), 100 );
}
}
dostuff();
|
second - changing the fullscreen mode is only possible as reaction of a user interaction (click, keypress) in the Flashplayer - that means a call from Javascript to change the fullscreen mode will not work - this is a Flashplayer security limitation,
best regards,
Klaus