Can you determine the width and height of a Flash/SWF object server-side?
flash
Solution
There is likely an easier way but,
you can download "FlashTools.zip" from http://blogs.msdn.com/mswanson/archive/2006/10/15/example-c-code-for-reading-flash-swf-files.aspx and compile the project. Then add a reference to the "FlashTools.dll" assembly. You can then get height/width using:
SWFFile swf = new SWFFile(fileLocation);
Response.Write("Height:" + swf.FrameHeight/20 + " Width:" + swf.FrameWidth/20);
I've tested this and it shows the correct information.
Problem
I'd like to allow users of a web-based CMS to upload Flash files and include them in the content. I'll probably use SWFObject to render the flash , but I need the width and height. Is this possible to determine these via C# when I do the upload? Thanks.