The compc command in flexsdk can compile the as files with the package name into SWF files and package them into a file. The file extension is. SWC, which is called a component in flash. In fact, the component file format is actually zip. You can use WinRAR to change the extension name .swcto .zip.
For example, you can plan the directory locally. After debugging, you can take it out and package it separately.
Assume that there are two as files under the "D:/project/tool/huxiaowei/classes" directory "gametask. as "," movietask. as ", in the Adobe Flex 3 SDK command prompt command line, enter:
CD Project/tool
Compc-include-sources huxiaowei/classes/Output D:/hxwlib. SWC
In this way, the two as files are packaged into the "D:/" file named "hxwlib. SWC ".
You can delete the as file in the project. You only need to apply the hxwlib. SWC file to the file by using the <G id = "1"> Create path> library path> Add SWC </G> command.
PS: if there is an as written based on hxwlib. SWC, If You Want To compile this as into a SwF without dependency components (that is, it can exist independently), you can further run it in the command line:
Amxmlc-library-Path = C:/3rd. SWC helloworld.
Flashplayer helloworld.swf