开发者

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

开发者 https://www.devze.com 2023-03-26 18:09 出处:网络
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 pri开发者_开发技巧vate? is it pro

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 pri开发者_开发技巧vate? is it protected? can I extend it?

Does such a source view of internal AS3 code exist?


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).


Can't tell you about viewing the source, but constructChildren is not available for override. The following gives an error in FDT because it cannot see a corresponding method in the superclass:

package {
    import flash.display.DisplayObjectContainer;

    public class Test extends DisplayObjectContainer {

        public function Test():void
        {   
        }

        override protected function constructChildren():void
        {       
        }
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消