ice78991
Programmer
- Nov 20, 2006
- 216
I am using a DOM Script to load a flash movie and I want to set the movie size to fit the screen 100%.
I have used screen.availHeight to get the screen dimensions but have found that I needed to tweek the figure ( -175 ) to get a better fit.
Could someone explain why this is so and is this the best way to get a close to 100% fit. It seems to act differently in Firefox and IE but results are fairly good. I am using the script to load the movie to avoid IE's click to activate this control warning.
<center><p id="site"><a href=" Upgrade to Flash 8</a> to use this sitedemo.</p></center>
<script type="text/javascript">
var scrWidth = (screen.availWidth - 50).toString();
var scrHeight = (screen.availHeight - 175).toString();
var FO = { movie:"movie.swf",width:scrWidth,height:scrHeight,majorversion:"8",build:"0",bgcolor:"#000000"};
UFO.create(FO,"site");
</script>
I have used screen.availHeight to get the screen dimensions but have found that I needed to tweek the figure ( -175 ) to get a better fit.
Could someone explain why this is so and is this the best way to get a close to 100% fit. It seems to act differently in Firefox and IE but results are fairly good. I am using the script to load the movie to avoid IE's click to activate this control warning.
<center><p id="site"><a href=" Upgrade to Flash 8</a> to use this sitedemo.</p></center>
<script type="text/javascript">
var scrWidth = (screen.availWidth - 50).toString();
var scrHeight = (screen.availHeight - 175).toString();
var FO = { movie:"movie.swf",width:scrWidth,height:scrHeight,majorversion:"8",build:"0",bgcolor:"#000000"};
UFO.create(FO,"site");
</script>