Hi, I am trying to resize a flash movie on a page.
What is happening is that there are buttons in my flash movie that call the javascript function newSize(), passing in new values. The intended behavior is for the div with the id of “container” to resize, making the flash movie resize.
However, my code works in IE but not Firefox. I was wondering if anyone had a clue about what the problem could be.
<!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>resize</title>
<script language="javascript" type="text/javascript">
function newSize(width,height)
{
document.getElementById("container").style.width = width;
document.getElementById("container").style.height = height;
}
</script>
</head>
<body>
<div id="container" style="width:500px; height:500px; ">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="100%" id="resize">
<param name="movie" value="resize.swf" />
<param name="quality" value="high" />
<embed src="resize.swf" quality="high" width="100%" height="100%" name="resize" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</div>
</body>
</html>