Specifications

CHAPTER 2
24
Modules let you split your application into several separate SWF files. The main application, or shell, can dynam-
ically load other SWF files that it requires, when it needs them. It does not have to load all modules when it starts,
nor does it have to load any modules if the user does not interact with them. When the application no longer needs
a module, it can unload the module to free up memory and resources.
For more information, see “Creating Modular Applications” on page 981.
Compiling an application
Compiling your application converts your application files and assets into a single SWF file. During compilation,
you set compiler options to enable accessibility, enable debug information in the output, set library paths, and set
other options. You can configure the compiler as part of configuring your project in Flex Builder, by using
command-line arguments to the compiler, or by setting options in a configuration file.
For more information on compiling applications, see Using the Flex Compilers” on page 125.
About case sensitivity during a compile
The Flex compilers use a case-sensitive file lookup on all file systems. On case-insensitive file systems, such as the
Macintosh and Windows file systems, the Flex compiler generates a case-mismatch error when you use a
component with the incorrect case. On case-sensitive file systems, such as the UNIX file system, the Flex compiler
generates a component-not-found error when you use a component with the incorrect case.
Compiling a Flex SDK application
Flex SDK includes two compilers, mxmlc and compc. You use mxmlc to compile MXML files, ActionScript files,
SWC files, and RSLs into a single SWF file. After your application is compiled and deployed on your web or appli-
cation server, a user can make an HTTP request to download and play the SWF file on their computer. You use
the compc compiler to compile components, classes, and other files into SWC files or RSLs.
To compile an application with Flex SDK, you use the mxmlc compiler in the bin directory of your Flex SDK
directory. The most basic mxmlc example is one in which the MXML file for your application has no external
dependencies (such as components in a SWC file or ActionScript classes). In this case, you open mxmlc from the
command line and point it to your MXML file, as the following example shows:
$ mxmlc c:/myFiles/app.mxml