Search code examples
actionscript-3introspection

How can I "read" undocumented AS3 API from source?


What is the best technique for getting at the source code for internal AS3 methods? I'm trying to learn more about DisplayObjectContainer.constructChildren() - is it private? is it protected? can I extend it?

Does such a source view of internal AS3 code exist?


Solution

  • you can try decompiling the playerglobal.swc. even though it's not always easy to tell what's going on in a decompiled class file (and nearly impossible if the code is obfuscated) you should be able to get an idea of what's happening.

    1. duplicate then rename playerglobal.swc to playerglobal.zip and unzip it.
    2. decompile the library.swf file found within the unzipped archive.

    you can use one of several commercial Flash decompilers available on the internet. the one i sometimes use for this purpose is Trillix since the free demo will still allow you to read the source files (but you won't be able to highlight/copy the code).