Tutorial :How do I find the natural size/dimensions of a Flash SWF file?


I've been given a Flash file (.swf extension) to put into a web page. Opening the file in my browser makes it quite blurry, so I'm assuming there is a natural size for the file, same as an image.

It's also rectangular so I need to work out the aspect ratio if I don't have an exact size. How would I find this information out?


I was wondering how to get this myself last night. Didn't find anything on google, but then I remembered that PHP's getimagesize works on swf movies:

<?php      $file = "YOUR_FILE.swf";      $info = getimagesize($file);      $width = $info[0];      $height = $info[1];      print "{$width}x{$height}\n";  ?>  


After years I finally found a little tool that does exactly one thing: Displaying the height and width of a flash file. I cannot believe that Adobe never realized that knowing the size of a flash program is important.

Here you go: https://github.com/q2apro/swfinfo/raw/master/swfinfo.swf

I could not find the original source, please credit the developer if you know about. Thanks.


I made script to detect dimensions of remote swf and print embed code of file.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »