|
|
Quellcode |
1 2 3 |
<script>
embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano"});
</script>
|
|
|
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 |
</script> <style type="text/css">
html {
height: 100%;
overflow: hidden;
}
#flashcontent {
height: 100%;
}
body {
height: 100%;
margin: 0;
padding: 0;
}
</style> <link rel="stylesheet" href="web_site.css">
</head>
<body bgcolor="#000000" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
<script language="javascript" type="text/javascript">
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/iPod/i)))
{location.href='ios/tour.html';}
</script>
<div id="flashcontent" align="CENTER">
<p> </p>
<p class="heading_main_bold_italic">This content requires Adobe Flash Player
10 plugin</p>
<p class="heading_main_bold_italic">Please visit <a href="http://www.adobe.com/go/getflashplayer/" target="_blank">adobe.com</a>
and install it</p>
<p class="heading_main_bold_italic">After
installation click <a href="javascript: window.location.reload()">here</a> to continue</p>
</div>
<div id="flashcontent"> </div>
<script type="text/javascript">
var so = new SWFObject("tour.swf", "tour", "100%", "100%", "8");
so.addParam("allowFullScreen","true");
so.addParam("scale", "noscale");
so.addVariable("xml_file","tour.xml");
so.addParam("allowScriptAccess","sameDomain");
so.addParam ("bgcolor", "#000000");
so.write("flashcontent");
</script>
</body>
</html>
|
|
|
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 |
<!DOCTYPE html>
<html>
<head>
<title>krpano.com</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>
@media only screen and (min-device-width: 800px) { html { overflow:hidden; } }
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:#000000; }
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:100%; height:100%;">
<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>
|
|
|
Quellcode |
1 2 3 4 5 |
if (swfobject.hasFlashPlayerVersion("9")) {
(Code to run flash tour)
} else {
(Code to run non-flash tour)
}
|
|
|
Quellcode |
1 |
embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano", html5:"auto"});
|
|
|
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 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title> Virtual Tour</title>
<script type="text/javascript" language="javascript" src="swfobject.js"></script>
<style type="text/css">
html {
height: 100%;
overflow: hidden;
}
#flashcontent {
height: 100%;
}
body {
height: 100%;
margin: 0;
padding: 0;
}
</style> <link rel="stylesheet" href="web_site.css">
</head>
<body bgcolor="#000000" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
if (swfobject.hasFlashPlayerVersion("9"))
{
<div id="flashcontent"> </div>
<script type="text/javascript">
var so = new SWFObject("tour.swf", "tour", "100%", "100%", "8");
so.addParam("allowFullScreen","true");
so.addParam("scale", "noscale");
so.addVariable("xml_file","tour.xml");
so.addParam("allowScriptAccess","sameDomain");
so.addParam ("bgcolor", "#000000");
so.write("flashcontent");
</script>
}
else {
{location.href='ios/tour.html';}
}
</body>
</html>
|
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »masten« (7. Juni 2017, 11:53)
Only problem now is can't get it to detect flash (using the code below) Works on desktop (with flash). On Android (Samsung Galaxy j5) just get a black screen like its not seeing the else statement and redirecting to the ios tour (ios/tour.html)
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<div id="flashcontent"> </div>
<script type="text/javascript">
if (swfobject.hasFlashPlayerVersion("9")) {
var so = new SWFObject("tour.swf", "tour", "100%", "100%", "8");
so.addParam("allowFullScreen","true");
so.addParam("scale", "noscale");
so.addVariable("xml_file","tour.xml");
so.addParam("allowScriptAccess","sameDomain");
so.addParam ("bgcolor", "#000000");
so.write("flashcontent");
} else {
location.href='ios/tour.html';
}
</script>
|
|
|
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 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Virtual Tour</title>
<script type="text/javascript" language="javascript" src="swfobject.js"></script>
<style type="text/css">
html {
height: 100%;
overflow: hidden;
}
#flashcontent {
height: 100%;
}
body {
height: 100%;
margin: 0;
padding: 0;
}
</style> <link rel="stylesheet" href="web_site.css">
</head>
<body bgcolor="#000000" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
<div id="flashcontent"> </div>
<script type="text/javascript">
if (swfobject.hasFlashPlayerVersion("9")) {
var so = new SWFObject("tour.swf", "tour", "100%", "100%", "8");
so.addParam("allowFullScreen","true");
so.addParam("scale", "noscale");
so.addVariable("xml_file","tour.xml");
so.addParam("allowScriptAccess","sameDomain");
so.addParam ("bgcolor", "#000000");
so.write("flashcontent");
} else {
location.href='ios/tour.html';
}
</script>
</body>
</html>
|
|
|
Quellcode |
1 2 3 4 5 6 7 |
<script type="text/javascript">
if (swfobject.hasFlashPlayerVersion("9")) {
alert("WE GOT FLASH!!");
} else {
alert("Ah...no flash");
}
</script>
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<script type="text/javascript">
if (swfobject.hasFlashPlayerVersion("9")) {
alert("WE GOT FLASH!!");
var so = new SWFObject("tour.swf", "tour", "100%", "100%", "8");
so.addParam("allowFullScreen","true");
so.addParam("scale", "noscale");
so.addVariable("xml_file","tour.xml");
so.addParam("allowScriptAccess","sameDomain");
so.addParam ("bgcolor", "#000000");
so.write("flashcontent");
} else {
alert("Ah...no flash");
location.href='ios/tour.html';
}
</script>
|
Could it be SWF Object Version. I have 1.5.
|
|
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 |
<div id="flashContent"></div>
<script type="text/javascript">
if (swfobject.hasFlashPlayerVersion("9")) {
var flashvars = {};
flashvars.panoName = "images/blank";
flashvars.panHome = "0";
flashvars.zoomHome = "0";
flashvars.tiltHome = "0";
flashvars.xml_file = "xml/taliesin.xml";
var params = {};
params.quality = "high";
params.wmode = "direct";
params.allowscriptaccess = "sameDomain";
params.allowFullScreen = "true";
params.bgcolor = "#D6D6D6";
var attributes = {};
attributes.id = "VRTour";
swfobject.embedSWF(
"../files/pano.swf", "flashContent",
"100%", "100%",
"10.0.12", "../Scripts/expressInstall.swf",
flashvars, params, attributes);
}
</script>
|
|
|
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 |
<krpano> <!-- Plugins --> <plugin name="ga" url="plugins/analytics.swf" alturl="plugins/analytics.js" keep="true" preload="true" debug="true" account="UA-15611979-1" > </plugin> <action name="activatepano"> if (%1 != null, if (get(action[mainloadpano].content) !== null, if (%2 == xml, mainloadpano(%HTMLPATH%/%1), mainloadpano(%1)), if (%2 == xml, loadpano(%HTMLPATH%/%1,null,MERGE,BLEND(1)), loadscene(%1,null,MERGE,BLEND(1))); wait(blend); ) ); </action> <action name="add_scenes_to_analytics"> for (set(i,0), i LT scene.count, inc(i), if (get(scene[get(i)].url), copy(data[a.url].content, scene[get(i)].url), copy(data[a.url].content, scene[get(i)].name)); plugin[ga].addPano(get(scene[get(i)].name), get(scene[get(i)].name), true, get(data[a.url].content)); ); </action> <action name="trackpageviews"> plugin[ga].trackpageview(/suite_bedroom/); </action> </krpano> |