Compile actionscript using mxmlc compiler
How would you compile actionscript code whose main class is inside a package using mxmlc command line compiler? Consider the following -
com.nu开发者_高级运维aavee::MainClass
com.nuaavee.utility::SomeUtility
MainClass
imports SomeUtility
class.
Is there a way to compile these classes keeping MainClass
as the main class to generate a swf?
Here is a solution that has been tested to work -
mxmlc -output main.swf src/com/nuaavee/MainClass.as -source-path src/
If it's just a Utility class, it should be compiled inside the MainClass.swf as long as it's referenced. i.e. import SomeUtility;
If SomeUtility is actually another swf, you can compile it as a module to load in and out of your MainClass, but that's more complex.
精彩评论