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

DisgruntledGoat picture DisgruntledGoat · Dec 2, 2009 · Viewed 14.5k times · Source

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?

Answer

typeoneerror picture typeoneerror · Dec 2, 2009

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";
?>