problem with HTML5 ---- after show page , render krpano

  • it's ok when I use this code .

    Code
    <div id="krpanoDIV"  style="margin:20px; border:5px solid #FFC; padding:20px;" ></div>
    <script type="text/javascript">
    		 var viewer = createPanoViewer({swf:"krpano/krpano.swf",target:"krpanoDIV"});
    		viewer.addVariable("xml", "bss.xml");
    		viewer.embed();
    </script>

    but width this code the page is all white

    Code
    <div id="krpanoDIV" onclick="showPano()"  style="margin:20px; border:5px solid #FFC; padding:20px;" ></div>
    
    
    <script type="text/javascript">
    	function showPano(){
    		 var viewer = createPanoViewer({swf:"krpano/krpano.swf",target:"krpanoDIV"});
    		viewer.addVariable("xml", "bss.xml");
    		viewer.embed();
    	}
    </script>

    when I click the div#krpanoDiv , It should render krpano. but the page change white. only happen in HTML5, flash is ok. *confused*

  • Hi,

    doing such is only possible when:

    1. the latest swfkrpano.js as used
    2. and all .js files (viewer and license) are already loaded/included


    that means:

    • either use a single .js file where the swfkrpano.js, krpanoiphone.license.js and krpanoiphone.js are merged into the one file (typically when using the MAKE PANO droplet)
    • or include all these 3 files manually in the html file in that order:

      Code
      <script src="swfkrpano.js"></script>
      <script src="krpanoiphone.license.js"></script>
      <script src="krpanoiphone.js"></script>


    best regards,
    Klaus

  • Hi,

    doing such is only possible when:

    1. the latest swfkrpano.js as used
    2. and all .js files (viewer and license) are already loaded/included


    that means:

    • either use a single .js file where the swfkrpano.js, krpanoiphone.license.js and krpanoiphone.js are merged into the one file (typically when using the MAKE PANO droplet)
    • or include all these 3 files manually in the html file in that order:

      Code
      <script src="swfkrpano.js"></script>
      <script src="krpanoiphone.license.js"></script>
      <script src="krpanoiphone.js"></script>


    best regards,
    Klaus

    thank you for your answer.

    when look at the demo , there are a code blow

    But some variable i don't know what it's mean. dragging、pressed、drag_stagex、drag_currentx, and i don't find the attribute in document.

    and is there any else attribute i don't know, where i can find them ?

Participate now!

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