You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, March 21st 2011, 11:34am

[SOLVED] Using krpano without XML file

Hello

What would be the code for embedding krpano in HTML if need to achieve this:

1. I wrote PHP script to read directory with equirectangular panorama jpegs.
2. according to amount of jpeg files my script creates same amount of buttons.
3. when clicked, each button opens same HTML page in lightbox manner, and passes jpg file name as url parameter into krpano.swf

I'm already using shadowbox for poping up html windows with non-krpano panoramas here: www.krk360.com

Questions:
- How to embed krpano.swf into html so that it can grab filename from passed URL parameter, without needing for XML file?
- I've looked into all examples but all are using XML files.

Thanks
Regards

This post has been edited 1 times, last edit by "Krx" (Mar 21st 2011, 12:09pm)


2

Monday, March 21st 2011, 12:11pm

Some digging trough forum resulted with this:

Source code

1
2
3
4
5
6
7
<script type="text/javascript">
	var swf = createswf("panorama.swf");
	swf.addVariable("image.type", "SPHERE");
	swf.addVariable("image.sphere.url", "<?php echo $pano ?>");
	swf.addVariable("xml","panorama.xml");
	swf.embed("krpanoDIV");
</script>


So Ill use XML to store all other possible settings and above for my purpose.

Regards