[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: http://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

    Edited once, last by Krx (March 21, 2011 at 12:09 PM).

  • Some digging trough forum resulted with this:

    PHP
    <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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!