http://getid3.sourceforge.net/
This will get you not only width and height, but a lot of really useful
information such as bg color, frame rate, etc...
And here's my (somewhat old) php code for rendering the swf:
$fileInfo = GetAllFileInfo($filePath,'swf');
$version = $fileInfo["swf"]["header"]["version"];
$width = $fileInfo["video"]["resolution_x"];
$height = $fileInfo["video"]["resolution_y"];
$bgcolor = $fileInfo["video"]["bgcolor"];
$html = <<<EOD
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=$version,0,0,0"
WIDTH="$width" HEIGHT="$height" ALIGN="">
<PARAM NAME=movie VALUE="$fileSrc"> <PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=$bgcolor> <EMBED src="$fileSrc" quality=high
bgcolor=$bgcolor WIDTH="$width" HEIGHT="$height" ALIGN=""
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
EOD;
Peace
Chris
Éric Thibault wrote:
Hello all!
Is there a way to know via PHP the dimensions (height & width) of a SWF
file? I need this information to construct an html interface with all
kinds of SWF loaded via UFO script!
Thanks a million!
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com