Flash does not use the full screen size when using createPanoViewer()

  • I just upgraded to krpano 1.0.8.12 (from 1.0.8.11), and started using "createPanoViewer()" instead of "new SWFObject()" which I had been happily using for a long time.

    But now, strangely, the flash area is not covering the whole screen in Firefox and Opera. Even when I specify width and height to be 100%, the height is still only a fraction of the actual browser space (and different in each browser). Chrome and IE6 do use the full space, however.

    (When I specify a height in pixels, then it does use that many pixels, but I need 100%, and it used to always work in all browsers.)

    This is my code:

    Code
    <script type="text/javascript">
    // <![CDATA[
    	var viewer = createPanoViewer({swf:"/_swf/krpano/krpano.swf", id:"krpanoSWFObject", target:"panodiv", width:"100%", height:"100%"});
    	viewer.addVariable("xml", xml);
    	viewer.embed();
    // ]]>
    </script>

    (In reality there are some more addVariables there, but even when I trim it down to the above, the problem remains.)

    Here is the url

    Is there a bug in the new swfkrpano.js (unlikely), or am I forgetting to do something (more likely)?

    - Ronny D'Hoore

  • Hi,

    have you really just changed the swfkrpano.js and nothing else?...

    the reason for the problem is the 100% height HTML/CSS problem in non quicks mode (=when using a DOCTYPE),

    the solution should be to add a 100% height to the pano div element
    and maybe also to the html and body elements,
    e.g.

    Code
    <DIV id="panodiv" style="height:100%">

    best regards,
    Klaus

  • Hmm, you are correct, I also ran my page through a validator and added all the things that it said were missing, including a DOCTYPE. *sad*

    You are quite right, I have to add it to div, body and html as well before it actually works properly.

    Thank you so much, Klaus! If you would know how long I've been breaking my head over this, almost half a day... It drove me nuts...

    Best regards,
    Ronny

    - Ronny D'Hoore

  • Quote

    height (optional)
    Height of the Viewer object, can be a absolute pixel value or a relative percent value.
    Default = "100%".

    I see what you are saying. Adding a note about doctype here would be beneficial since it does mention the optional height parameters.


    Jarred

Participate now!

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