开发者

Compile actionscript using mxmlc compiler

开发者 https://www.devze.com 2023-01-24 16:28 出处:网络
How would you compile actionscript code whose main class is inside a package using mxmlc command line compiler? Consider the following -

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消