[英]Compile actionscript using mxmlc compiler
How would you compile actionscript code whose main class is inside a package using mxmlc command line compiler? 您将如何使用mxmlc命令行编译器来编译主要类位于包中的actionscript代码? Consider the following -
考虑以下 -
com.nuaavee::MainClass
com.nuaavee.utility::SomeUtility
MainClass
imports SomeUtility
class. MainClass
导入SomeUtility
类。
Is there a way to compile these classes keeping MainClass
as the main class to generate a swf? 有没有一种方法可以编译这些类,而将
MainClass
作为生成SWF的主要类呢?
这是经过测试可以正常工作的解决方案-
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. 如果只是Utility类,则只要被引用,就应该在MainClass.swf中进行编译。 ie import SomeUtility;
即导入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. 如果SomeUtility实际上是另一个swf,则可以将其编译为模块以加载和卸载MainClass,但这更加复杂。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.