Saturday, April 28, 2007


Joe Berkovitz has reported on a little tool that dumps information about an swf (or swc) into a tidy XML. His post is here:

But what can we do with this new found feature?

The -showoffset option allows us to see many bytes each class takes up in the file (which can be very useful for optimization), and the location in the file. The location is information flash and the flex compiler may need by I haven't found a way for the location to be useful to us yet.

The -asm option returns (in very complex XML form) the definitions of the classes, methods and properties regardless of the namespace of entities. This could be good for hacking someone else's compiled classes, but only for functions that aren't private and not documented, and most good programmers won't leave those types of functions lying around unless they really need to. (Additionally, there are usually other, more efficient, ways to find these functions in my opinion, such as seeing what "Content Assist" comes up with.) Additionally, this only gives you the definition, we still don't know how to use the newly found entities.

I tried running this on the globalplayer.swc and very little interesting came out of it. There don't appear to be any hidden namespaces. There are a couple functions hidden in the internal (not mx_internal) namespace, but half of these have proxy functions in the public namespace and the other half involve low level features such as adding event listeners that I can't find a reason to mess with.

All in all, it's an interesting tool, but I'm still looking for more uses.

No comments:

"Flex", "ActionScript" and possibly "MXML" are probably trademarks of Adobe Systems Incorporated.
"Adobe" is a trademark of Adobe Systems Incorporated.
This site is in no way endorsed or sponsored by Adobe Systems Incorporated.
Content Copyright © 2007 Daniel Freiman.
Site Design Copyright by its copyright holder.
The Flex Non-Docs reserves the right to remove comments for any reason.
All ActionScript and MXML code (and ONLY ActionScript and MXML code) on this website is available under the MIT License.