Specifications

157ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
For more information about the HTML wrapper, see “Creating a Wrapper” on page 311.
Using SWC files
Often, you use SWC files when compiling MXML files. SWC files can provide themes, components, or other
helper files. You typically specify SWC files used by the application by using the
library-path option.
The following example compiles the RotationApplication.mxml file into the RotationApplication.swf file:
mxmlc -library-path+=c:/mylibraries/MyButtonSwc.swc
c:/myfiles/comptest/testRotation.mxml
In a configuration file, this appears as the following example shows:
<compiler>
<library-path>
<path-element>c:/flexdeploy/frameworks/libs/framework.swc</path-element>
<path-element>c:/flexdeploy/frameworks/locale/{locale}/framework_rb.swc</path-
element>
<path-element>c:/mylibraries/MyButtonSwc.swc</path-element>
</library-path>
</compiler>
About incremental compilation
You can use incremental compilation to decrease the time it takes to compile an application or component library
with the Flex application compilers. When incremental compilation is enabled, the compiler inspects changes to
the bytecode between revisions and only recompiles the section of bytecode that has changed. These sections of
bytecode are also referred to as compilation units.
You enable incremental compilation by setting the
incremental option to true, as the following example shows:
mxmlc -incremental=true MyApp.mxml
Incremental compilation means that the compiler inspects your code, determines which parts of the application
are affected by your changes, and only recompiles the newer classes and assets. The Flex compilers generate many
compilation units that do not change between compilation cycles. It is possible that when you change one part of
your application, the change might not have any effect on the bytecode of another.
As part of the incremental compilation process, the compiler generates a cache file that lists the compilation units
of your application and information on your applications structure. This file is located in the same directory as
the file that you are compiling. For example, if my application is called MyApp.mxml, the cache file is called
MyApp_n.cache, where n represents a checksum generated by the compiler based on compiler configuration. This
file helps the compiler determine which parts of your application must be recompiled. One way to force a
complete recompile is to delete the cache file from the directory.