Pure Actionscript 3 Adobe Air Application main class constructor not being called

Posted by SilverCode on Stack Overflow See other posts from Stack Overflow or by SilverCode
Published on 2010-02-08T14:39:44Z Indexed on 2010/06/15 0:32 UTC
Read the original article Hit count: 475

I'm writing an Air application using only Actionscript, and Flex3 SDK as the compiler. Everything compiles and runs fine under adl, but when the final air file is built and installed, the main class is never initialized. For instance:

package {
    import flash.display.Sprite;
    public class main extends Sprite {
        public function main() {
            trace("Init");
        }
    }
}

When run under ADL, "Init" will be output to the console, but when installed and run, nothing happens (the constructor for class main is never called).

© Stack Overflow or respective owner

Related posts about actionscript-3

Related posts about actionscript