PDA

View Full Version : is this javascript or css problem??


sooon
08-15-2007, 06:45 AM
hi guys,

I was recommended to use swfobject and the function works well for me, except for a small issue which I do not know if is html or css or javascript issue.

i have a html embed swf. and I wanted the flash to be fullscreen. so I change the html to be width and height 100%. the width works fine but somehow the height force the frame to shrink to smaller then fullscreen.

here is my html:
<!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>mytest</title>
<script type="text/javascript" src="swfobject.js"></script>
<style type="text/css">
body
{
background-color: #ffcc33;
}
</style>
</head>
<body>
<div id="mytestContainer">You need the Flash Player version 8.0.0.0 or higher and a JavaScript enabled browser to view this site</div>
<script type="text/javascript">
// <!--
var ignoredParams = {src: 1, bgcolor: 1};
var params = String('src="mytest.swf" quality="high" bgcolor="#CC33CC" ').split(" ");
var swf = new SWFObject("mytest.swf", "mytest", "100%", "500%", "8.0.0.0", "#CC33CC");
swf.addVariable("currentURL",location.href);
swf.addParam("align", "middle");
for(var i = 0; i < params.length; i++)
{
var paramName = params[i].split("=")[0];
var paramValue = params[i].split("\"")[1];

if(ignoredParams[paramName] != 1 && paramName != "")
{
swf.addParam(paramName, paramValue);
}
}
swf.write("mytestContainer");
// -->
</script>
</body>
</html>


here is the source file (http://www.acteevist.com/download/mytest.zip).