Detect size of swf file

I’m using this code to embed swf to website, but height and wight should be detected automatically.


<OBJECT ID="aa" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="600" height="450" align="center">
<PARAM NAME=movie VALUE="MYFLASHFILE">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="MYFLASHFILE" width="600" height="450" quality=high TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"> </EMBED>
</OBJECT>

as you may see here width=“600” and height=“450”, but it should be done automaticly.

As far as I know there is no way to find the height and width of a SWF file using JavaScript, however you can find the values using PHP and the getimagesize() function.

Thanks, it’s worked, I didn’t know that I can get size of swf using getimagesize() function :).

I know this is a somewhat old thread, but I was looking for the same thing and just found this possible solution using JavaScript and the TGetProperty Flash method:

http://blog.codefidelity.com/?p=14

Just posting it here in case it’s helpful for others.