Expand a Flash movie in height and width by 100%
Tuesday, February 9, 2010 22:00To expand a flash movie (.swf) by 100% you have to set its height and width to 100%. But that’s not enough. The parent container the movie is sitting in needs to be 100% w/h too. By default all DIVs are 100% wide but they don’t expand 100% in height. To accomplish this set the css property height to 100% for the HTML and BODY tags and the DIV tag the flash movie is residing in.Code sample:
<html>
<head>
<title>Untitled Document</title>
<style type=”text/css”>
html, body { height: 100%; }
body { margin:0px; padding:0px; }
#myDiv { style=”width:100%; height:100%; background-color:#555555; }
</style></head><body>
<div id=”myDiv” >
<object width=”100%” height=”100%” >
<param name=”movie” value=”home.swf” />
<param name=”quality” value=”high” />
<param name=”scale” value=”noscale” />
<embed src=”home.swf” scale=”noscale” width=”100%” height=”100%” quality=”high”/>
</object>
</div></body>
</html>