PDA

View Full Version : Size SWF to resolution


quinu
10-18-2006, 05:38 PM
Is it possible to alter the Flash size according to the resolution? I have tried this, but it doesn't like it. The .swf doesn't show at all.

<script type="text/javascript" language="JavaScript">
var FW = null;
var FH = null;

if(screen.availWidth > 1024){
FW = 1024;
FH = 768;
}else{
FW = 900;
FH = 730;
}
}

</script>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH=FW HEIGHT=FH align="left">