Compile actionscript using mxmlc compiler

天涯浪子 提交于 2020-01-07 05:05:47

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!