Ok - this is more specific on how I did this. It took a while to get this down, but I think it was worth it.
<?php
if ($W && $H) {
setcookie ("W", $W, time()+30240000, "/");
setcookie ("H", $H, time()+30240000, "/");
print "<HTML><HEAD><LINK REL=stylesheet TYPE=\"text/css\" HREF=Style.css><title>";
$width = ($W*940) / 1024;
$height = ($H*620) / 768;
$Dimensions = "WIDTH=$width HEIGHT=$height";
print "</title></head><body bgcolor=\"#FFFFFF\" topmargin=\"0\" leftmargin=\"0\" rightmargin=\"0\" marginheight=\"0\" marginwidth=\"0\"><center>";
print "<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"
codebase=\"
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\"
$Dimensions>....................REST OF EMBED CODE.......";
print "</center></BODY></HTML>";
}
###########################################
### Else - Redirect User to get Screen Size
else {
print "<HTML><HEAD><SCRIPT LANGUAGE=\"javascript\">top.location=\"index.php?W=\"+screen.width+\"&H=\"+screen.height;</script></HEAD><BODY></BODY></HTML>";
}
?>
-Ok That's about all of it. You can see that If $W and $H have a value then it will embed the SWF - IF they do not have a value -Then it will print the Javascript to the screen which will get the Users Screen Height and Width then attach them onto the end of Index.php as Index.php?W=Width&H=Height - And redirect the page to itself. Then PHP will test again wether or not their is a value for $W and $H - Then ....
Well you get the idea.