actionscript-3flash-builder

how to force compiler compile all classes in my project?


im using Adobe® Flash® Builder™ 4.6,the problem also exist in previous versions.

for some reason ,i am using

cls = applicationDomain.getDefinition(name) as Class;

to get the object's constructor and then create the instance of my modules class.thus make compile ignore my module classes ,because they are not related from my main class.how to force else classes also compiled into my swf or swc file? i didn't find where i can adjust my compile option.

by now i use this way to solve my problem,at the very beginning of the program entry.

if(1+1==3){
    //never be run but do make classes merge into swf files.
    new MyModule();
}

i have hundreds of modules like this one,i do hope i can find a way to solve this problem permanently


Solution

  • You can try with this

    package
    {
    public class IncludeClasses
    {
        import com.abc.db.Database;Database;
        import com.abc.logs.RemoteLogTarget; RemoteLogTarget;
        import com.abc.logs.LocalLogTarget; LocalLogTarget;
        import com.abc.exception.GlobalExceptionHandler; GlobalExceptionHandler;
        import com.abc.utils.NetConnectionMonitor;NetConnectionMonitor;
    }
    }