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.

rdhoore108

Trainee

  • "rdhoore108" started this thread

Posts: 89

Location: Belgium

Occupation: Systems and Network Administrator

  • Send private message

1

Tuesday, December 14th 2010, 7:52pm

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:

Source code

1
2
3
4
5
6
7
<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

2

Tuesday, December 14th 2010, 8:14pm

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.

Source code

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


best regards,
Klaus

rdhoore108

Trainee

  • "rdhoore108" started this thread

Posts: 89

Location: Belgium

Occupation: Systems and Network Administrator

  • Send private message

3

Tuesday, December 14th 2010, 8:22pm

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. :-(

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

rdhoore108

Trainee

  • "rdhoore108" started this thread

Posts: 89

Location: Belgium

Occupation: Systems and Network Administrator

  • Send private message

4

Tuesday, December 14th 2010, 8:31pm

PS. Actually, I think if you would mention this in your page http://www.krpano.com/docu/swfkrpanojs/ , people might be saved a lot of trouble :) I have gone through that page so many times today, wondering what I had misinterpreted...
- Ronny D'Hoore

5

Tuesday, December 14th 2010, 9:49pm

Just to clarify, that error is not krpano specific. It is the doctype refusing to recognize the height % when used that way.

rdhoore108

Trainee

  • "rdhoore108" started this thread

Posts: 89

Location: Belgium

Occupation: Systems and Network Administrator

  • Send private message

6

Wednesday, December 15th 2010, 8:41pm

Yes, I appreciate that, it's just that this page I'm referring to explains how to integrate a krpano into a web page, and the problem I had was directly related to exactly that, and it is a problem anyone can run into.
- Ronny D'Hoore

7

Wednesday, December 15th 2010, 9:38pm

Quoted

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