Quick Example : Using COMPC to compile SWCs
I have been using the mxmlc and compc compilers a bunch this week (mxmlc and compc are ActionScript 3 / Flex 2 command line compilers included with the Free Flex 2 SDK). Whenever I start to use a command line compiler it can take me a while to figure out all of the correct arguments I need to pass it, but once I figure it out, it is pretty simple to use, as I just reuse a lot of the same args. I went through this process this week trying to compile a SWC (containing a Flex Component) with COMPC. I wanted to make a quick post showing how I compiled it, along with a quick explanation, with the hopes of providing a good baseline reference for anyone else who needs to do something similar in the future.
So, here is the entire command:
[code]compc -namespace http://www.adobe.com/2006/foo manifest.xml -source-path .
-include-namespaces http://www.adobe.com/2006/foo -include-classes mx.containers.MyWindow
-include-file MyWindow.png mx/containers/MyWindow.png
-output='MyWindow.swc'[/code]
Here is the manifest.xml file:
[code]
Related Entries
Comments
-
How is it possible to compile an AS3 SWC for use in Flex 2 that has an equivalent of a custom Live Preview in Flash Studio? Obviously, the built-in components in Flex 2 have a preview, but how can we create a custom one?