This is the HTML and Java code that I have been using forever on my flash sites. I recently designed a client site at 1024 x 768 and if viewed at 800 x 600 they can’t see it becuase it’s set not to scale. My problem is they don’t mind it being bigger than the screen but this java doesn’t allow for scroll bars. If someone can look over the code and help me out that would rock!!!
Thanks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>index_swoop</title>
<style type="text/css">
<!--
body, html{
height: 100%;
width: 100%;
margin: 0;
}
-->
</style>
</head>
<body bgcolor="#ffffff">
<SCRIPT LANGUAGE="JavaScript1.1">
<!--
function openWin(src, width, height) {
var w = 1024, h = 768;
if (document.all || document.layers) {
w = screen.availWidth;
h = screen.availHeight;
}
var leftPos = (w-width)/2, topPos = (h-height)/2;
window.open(''+src+'','','width='+width+',height='+height+',toolbar=no,status=yes,menubar=no,scrollbars=yes,resizeable=no,top=' + topPos + ',left=' + leftPos);void(0);
}
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if (plugin) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i) {
if (isNaN(parseInt(words*)))
continue;
var MM_PluginVersion = words*;
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0 && (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE="VBScript"\>
'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('MM_FlashCanPlay = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))
');
document.write('</SCR' + 'IPT\>
');
}
if (MM_FlashCanPlay) {
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="100%" id="index_swoop" align="middle">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="movie" value="index_swoop.swf" />');
document.write('<param name="quality" value="best" />');
document.write('<param name="bgcolor" value="#ffffff" />');
document.write('<param name="menu" value="false" / >');
document.write('<param name="scale" value="noscale" / >');
document.write('<embed src="index_swoop.swf" quality="best" menu="false" bgcolor="#ffffff" scale="noscale" width="100%" height="100%" name="index_swoop" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
} else {
window.location.href = "no_flash.html";
}
//-->
</SCRIPT>
</body>
</html>