问题
How would you compile actionscript code whose main class is inside a package using mxmlc command line compiler? Consider the following -
com.nuaavee::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?
回答1:
Here is a solution that has been tested to work -
mxmlc -output main.swf src/com/nuaavee/MainClass.as -source-path src/
回答2:
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.
来源:https://stackoverflow.com/questions/4169729/compile-actionscript-using-mxmlc-compiler