Sie sind nicht angemeldet.

1

Mittwoch, 16. Dezember 2009, 00:23

html code to load swfobect 2 ? ...exmple not in .9 downlad

html code to load swfobect 2 ? ...exmple not in .9 downlad

2

Mittwoch, 16. Dezember 2009, 10:58

Hi,
html code to load swfobect 2 ? ...exmple not in .9 downlad
how do you mean that??
templates for swfobject 2.1 are also included...

e.g.
to enable/use them for the "MAKE PANO (MULTIRES) droplet"
(this droplet uses the kmakemultires.config, other droplets other .config files)
open the "kmakemultires.config" and out-comment or remove these lines:

Quellcode

1
2
htmltemplate=templates/html/swfkrpano.html
htmltemplate_additional_file=templates/html/swfkrpano.js


and then in-comment (by removing the leading '#') these lines:

Quellcode

1
2
3
4
htmltemplate=templates/html/swfobject21.html
htmltemplate_additional_file=templates/html/swfobject21/swfobject.js
htmltemplate_additional_file=templates/html/swfobject21/swfkrpanomousewheel.js
htmltemplate_additional_file=templates/html/swfobject21/expressinstall.swf


best regards,
Klaus

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

3

Montag, 3. Mai 2010, 11:52

Hi,

Here is an alternative way to load krpano with swfobject 2.x
It parses all the url parameters and puts it in flashvars where krpano picks it up. It took me a while to translate the 1.5 function to 2.x So maybe this helps some people out. I translated it to a template. Maybe Klause could update his (A)?

Quellcode

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<html>
<head>
	<title>krpano.com - [NAME]</title>	
	<script type="text/javascript" src="swfobject21/swfobject.js"></script>
	<script type="text/javascript" src="swfobject21/swfkrpanomousewheel.js"></script>	
	<script type="text/javascript">
	// <![CDATA[	
		if (swfobject.hasFlashPlayerVersion("6.0.0")) 
		{
		// pass all external parameters
			var flashvars = {};			
			var q = document.location.search || document.location.hash;
			if(q)
			{
				var _params = q.substring(1).split("&");
				for(var i=0; i<_params.length; i++)
				{				
					var param = _params[i];
					var istgl = param.indexOf("=");
					var pname = param.substring(0,istgl);
					var pval  = param.substring(istgl+1);

					flashvars[pname] = pval;
				}
			}
			if (!swfobject.getQueryParamValue("pano")) {
				flashvars.pano = "[XML]"; //if no pano is specified in url, use the default one
			}
			if (!swfobject.getQueryParamValue("license")) {
				flashvars.license = "defaultlicense.license"; //if no license is specified, use the default one
			}
			
			var params = {};		
			params.wmode = "window";
			params.bgcolor = "FFFFFF";
			params.allowfullscreen = "true";
			params.allowscriptaccess = "always";
			
			var attributes = {};
			attributes.id = "krpano";
			swfobject.embedSWF("krpano.swf", "krpano", "100%", "100%", "9.0.0", "swfobject21/expressInstall.swf", flashvars, params, attributes);
			swfkrpanomousewheel.registerObject("krpano");
			}
		//does not have the right flash version
		else
		{
			document.getElementById("krpanoDIV").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br/><br/>Adobe Flash Player needed<br/><br/><br/><a href="http://www.adobe.com/go/getflashplayer/"  target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif" BORDER="1"></a><br/>...click here to download...<br/><br/><br/><br/></center></td></tr></table>';
		}
	// ]]>
	</script>	
	<style>
		body{ font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#FFFFFF; background-color:#000000; margin:0; padding:0; }
		* html, * html body{ overflow: hidden; }
		a{ color:#AAAAAA; text-decoration:underline; }
		a:hover{ color:#FFFFFF; text-decoration:underline; }
	</style>
</head>
<body>	
	<div id="krpanoDIV">
		<noscript><table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br/><br/>Javascript not activated<br/><br/></center></td></tr></table></noscript>
	</div>
</body>
</html>


Latest version is btw 2.2