Use the compc command to package SWC

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.