Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.


AS3: SWFReader Class

Posted October 03, 2008 by senocular

I originally made this class to get information from a SWF such as stage size (as defined by the authoring tool) and background color which are not available through ActionScript APIs, but I have extended it to include other information - basically everything in the SWF header, XMP metadata, and information from SWF tags specific to certain options such as local playback security, script timeout limit, and even the hardware acceleration mode for Flash Player 10 SWFs.

Also, if you feel adventurous, I've included a callback (tagCallback) which will call a function when a SWF tag is reached while the SWF is being read. You can use it to get more information from the SWF than what the class already extracts. All you need is to pick up the SWF file format specification and you'll be on your way.