You are not logged in.

Daniel25

Beginner

  • "Daniel25" started this thread

Posts: 20

Location: london

Occupation: photographer

  • Send private message

1

Wednesday, December 15th 2010, 8:04pm

white background using the fixaspectresize

Hi every one

It may be a stupid question for many of you but.... I'm getting crazy *wacko* .

Now I'm not a great expert of html coding and I find the sample difficult to understand.

Anyhow I did change my background color in the html code from black to white,easy so far, after I did implement the fix aspect resize to my xml file.

Now what happen is that it seam that this function has its own background color which is black.

Does any one know how to change it in to white??????

Thanks

Zephyr

Professional

Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message

2

Wednesday, December 15th 2010, 11:32pm

the body background is white, but you have a flash background to. Which for krpano is black.

You can change this too,

by default this is the code in your html:

<script type="text/javascript" src="swfkrpano.js"></script>

Source code

1
2
3
4
5
6
7
<script type="text/javascript">

	var swf = createswf("krpano.swf");
	swf.passQueryParameters();
	swf.embed("krpanoDIV");

</script>


createswf supports 5 parameters

1: path to krpano swf
2: id of krpano swf (default is krpanoSWFObject)
3: width default 100%
4: height defailt 100%
5: background-color default #000000 (black)

so all you have to do to change the code to

Source code

1
2
3
4
5
6
7
<script type="text/javascript">

	var swf = createswf("krpano.swf","krpanoSWFObject","100%","100%",#FFFFFF);
	swf.passQueryParameters();
	swf.embed("krpanoDIV");

</script>

Daniel25

Beginner

  • "Daniel25" started this thread

Posts: 20

Location: london

Occupation: photographer

  • Send private message

3

Monday, December 20th 2010, 7:55pm

Hy Zephyr, sorry for the late replay I just got to try your code today.

There is one problem: In my HTML code I cannot find the part

Quoted

<script type="text/javascript">

var swf = createswf("krpano.swf");
swf.passQueryParameters();
swf.embed("krpanoDIV");

</script>


Now I did try to play and change my script tag but with the only result of turning every things white.

Here is my HTML code, why is it different? and do you know how to change the script tag?

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html>
<head>
	<title>krpano.com - FLAT 101-EQUI-RECEPTION</title>
	<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<style>
		html { height:100%; }
		body { height:100%; overflow: hidden; margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:16px; color:#FFFFFF; background-color:#ffffff; }
		a{ color:#AAAAAA; text-decoration:underline; }
		a:hover{ color:#FFFFFF; text-decoration:underline; }
	</style>
</head>
<body>

<script src="tour.js"></script>

<div id="pano" style="width:50%; height:50%;">
	<noscript><table style="width:100%;height:100%;"><tr style="valign:middle;"><td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td></tr></table></noscript>
	<script>
		embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano"});
	</script>
</div>

</body>
</html>


Thanks

*smile* *smile* *smile*

Daniel25