Sie sind nicht angemeldet.

1

Mittwoch, 18. Mai 2011, 13:45

problem getting krpanoJS license to work

At my work we have purchased a krpanoJS license. I copied krpanoiphone.license.js to the folder that contained the standard krpano swf (root of site). Using the following code I got it to work


Quellcode

1
var viewer = createPanoViewer({swf:"krpano.swf", xml:"global.xml", target:"viewer"}); if ( viewer.isHTML5possible() )		{		viewer.useHTML5("always");		 viewer.embed();	 }



However, I have included several other JS files, that contain our code. I wanted the above code to be used inside the main.js script instead of embedding it into the index. Also I moved all krpano related files (swf, js's, licenses) into a /krpano folder. After getting messages of the krpanoJS not being available, I got that part to work indeed copying all files to the same folder and using the following code

Quellcode

1
2
var viewer = createPanoViewer({swf:"krpano/krpano.swf", xml:"global.xml", target:"viewer"});
							if ( viewer.isHTML5possible() )	{		viewer.useHTML5("always");		viewer.embed();	}



However I have not succeeded registering the viewer this way. I have tried adding license: krpanoiphone.js to the createPanoViewer init object, I have included swfkrano.js, krpanoiphone.js and krpanoiphone.license.js into my index to no avail. The krpano files are all still in the same folder. Also using the script debugger from safari I was able to find a krpanoreg node, that contained correct license. But still it is displaying the demo message.

Can someone please advise?

2

Freitag, 20. Mai 2011, 19:17

Hi,

for embedding the krpanoJS viewer dynamically it would be nesscery to use the latest 1.0.8.14 version,
and to use a ".js" file where all krpano .js files (swfkrpano.js, license, krpanoiphone.js) were embedded into one file (e.g. build when using the MAKE PANO droplets) or to include the js files in that order:

Quellcode

1
2
3
<script src="swfkrpano.js"></script>
<script src="krpanoiphone.license.js"></script>
<script src="krpanoiphone.js"></script>


I'm already planing to change that and make it easier to tuse, but this is the way it is currently working,

best regards,
Klaus

3

Montag, 23. Mai 2011, 09:47

Thank you, it worked!

So I just had to load the license before the js viewer script :D Never thought of that..

4

Mittwoch, 26. Oktober 2011, 15:41

Thank you!

This worked for me, too ;-)

Bernhard