Specifications
25ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
The mxmlc compiler has many options that you can specify on the command line, or that you can set in the flex-
config.xml file. For example, to disable warning messages, you set the
warnings options to false, as the following
example shows:
$ mxmlc -warnings=false c:/myFiles/app.mxml
You only specify the main application file, the file that contains the <mx:Application> tag, to the compiler. The
compiler searches the default source path for any MXML and ActionScript files that your application references.
If your application references MXML and ActionScript files in directories that are not included in the default
source path, you can use the
source-path option to add a directory to the source path, as the following example
shows:
$ mxmlc -source-path path1 path2 path3 c:/myFiles/app.mxml
In this example, you specify a list of directories, separated by spaces, and terminate that list with --.
Compiling an application that uses SWC files
Often, you use SWC files when compiling MXML files. You specify the SWC files in the compiler by using the
library-path option.
The following example adds two SWC files to the
library-path when it compiles your application:
$ mxmlc -library-path+=/myLibraries/MyRotateEffect.swc;/myLibraries/MyButtonSwc.swc
c:/myFiles/app.mxml
Compiling an application that uses RSLs
To use an RSL in your application, use the runtime-shared-library-path compiler option. The following
example compiles an application with an RSL at the command line:
$ mxmlc -runtime-shared-library-path=../lib/mylib.swc,../bin/library.swf Main.mxml
Compiling an application that uses modules
The way you compile modules is similar to the way you compile Flex applications. On the command line, you use
the mxmlc command-line compiler. The result is a SWF file that you load into your application as a module.
You cannot run the module-based SWF file as a stand-alone application or load it into a browser window. It must
be programmatically loaded by an application as a module.
For more information on compiling modules on the command line, see “Creating Modular Applications” on
page 981










