| Building and Deploying Flex 2 Applications > Building Flex Applications > Using the Flex Compilers > Using the application compiler > About the application compiler options | |||
The following table describes the application compiler options:
|
Option |
Description |
|---|---|
accessible=true|false
|
Enables accessibility features when compiling the Flex application or SWC file. The default value is For more information on using the Flex accessibility features, see Creating Accessible Applications in Flex 2 Developer's Guide. |
actionscript-file-encoding
|
Sets the file encoding for ActionScript files. For more information, see Setting the file encoding. |
advanced
|
Lists advanced help options when used with the help option, as the following example shows: mxmlc -help advanced
This is an advanced option. |
allow-source-path-overlap=true|false
|
Checks if a This is an advanced option. |
as3=true|false
|
Use the ActionScript 3.0 class-based object model for greater performance and better error reporting. In the class-based object model, most built-in functions are implemented as fixed methods of classes. The default value is This is an advanced option. |
benchmark=true|false
|
Prints detailed compile times to the standard output. The default value is |
context-root
|
Sets the value of the For more information on using the |
contributor name
|
Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
creator
|
Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
date
|
Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
debug=true|false
|
Generates a debug SWF file. This file includes line numbers and filenames of all the source files. When a run-time error occurs, the stacktrace shows these line numbers and filenames. This information is also used by the command-line debugger and the Flex Builder debugger. Enabling the For the mxmlc compiler, the default value is For SWC files generated with the compc compiler, set this value to For information about the command-line debugger, see Using the Command-Line Debugger. If you set this option to |
debug-password
|
Lets you engage in remote debugging sessions with the Flash IDE. This is an advanced option. |
default-background-color
|
Sets the application's background color. You use the 0x notation to set the color, as the following example shows: -default-background-color=0xCCCCFF
The default value is null. The default background of a Flex application is an image of a gray gradient. You must override this image for the value of the This is an advanced option. |
default-frame-rate int
|
Sets the application's frame rate. The default value is 24. This is an advanced option. |
default-script-limits
|
Defines the application's script execution limits. The The You can override these settings in the application. This is an advanced option. |
default-size
|
Defines the default application size, in pixels. This is an advanced option. |
defaults-css-url
|
Defines the location of the default style sheet. Setting this option overrides the implicit use of the defaults.css style sheet in the framework.swc file. For more information on the defaults.css file, see Using Styles and Themes in Flex 2 Developer's Guide. This is an advanced option. |
description
|
Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
dump-config
|
Outputs the compiler options in the flex-config.xml file to the target path; for example: mxmlc -dump-config myapp-config.xml
This is an advanced option. |
es=true|false
|
Instructs the compiler to use the ECMAScript edition 3 prototype-based object model to allow dynamic overriding of prototype properties. In the prototype-based object model, built-in functions are implemented as dynamic properties of prototype objects. The default value is Using the ECMAScript edition 3 prototype-based object model lets you use untyped properties and functions in your application code. As a result, if you set the value of the If you set this option to This is an advanced option. |
externs
|
Sets a list of symbols to exclude from linking when compiling a SWF file. This option provides compile-time link checking for external references that are dynamically linked. For more information about dynamic linking, see About linking. This is an advanced option. |
external-library-path
|
Specifies a list of SWC files or directories to exclude from linking when compiling a SWF file. This option provides compile-time link checking for external components that are dynamically linked. For more information about dynamic linking, see About linking. You can use the += operator to append the new SWC file to the list of external libraries. |
file-specs
|
Specifies the source file to compile. This is the default option for the mxmlc compiler. << THIS OPTION IS NOW HIDDEN>> |
fonts.flash-type=true|false
|
Sets the default value that determines whether embedded fonts use the FlashType rendering engine. Setting the value of the The default value is For more information about using FlashType, see Using Fonts in Flex 2 Developer's Guide. |
fonts.languages.language-range
|
Specifies the range of Unicode settings for that language. For more information, see Using Styles and Themes in Flex 2 Developer's Guide. This is an advanced option. |
fonts.local-fonts-snapshot
|
Sets the location of the local font snapshot file. The file contains system font data. This is an advanced option. |
fonts.managers
|
Defines the font manager. The default is flash.fonts.JREFontManager. You can also use the flash.fonts.BatikFontManager. For more information, see Using Styles and Themes in Flex 2 Developer's Guide. This is an advanced option. |
fonts.max-cached-fonts
|
Sets the maximum number of fonts to keep in the server cache. For more information, see Caching fonts and glyphs. This is an advanced option. |
fonts.max-glyphs-per-face
|
Sets the maximum number of character glyph-outlines to keep in the server cache for each font face. For more information, see Caching fonts and glyphs. This is an advanced option. |
frames.frame
|
Specifies a SWF file frame label with a sequence of class names that are linked onto the frame. This option lets you add asset factories that stream in after the application that then publish their interfaces with the ModuleManager class. The advantage to doing this is that the application starts faster than it would have if the assets had been included in the code, but does not require moving the assets to an external SWF file. This is an advanced option. |
generate-frame-loader=true|false
|
Toggles the generation of an IFlexBootstrap-derived loader class. This is an advanced option. |
headless-server=true|false
|
Enables the headless implementation of the Flex compiler. This sets the following: System.setProperty("java.awt.headless", "true")
The headless setting (java.awt.headless=true) is required to use fonts and SVG on UNIX systems without X Windows. This is an advanced option. |
help [-list [advanced]]
|
Prints usage information to the standard output. For more information, see Command-line syntax. |
include-libraries
|
Links all classes inside a SWC file to the resulting application SWF file, regardless of whether or not they are used. Contrast this option with the To link one or more classes whether or not they are used and not an entire SWC file, use the This option is commonly used to specify resource bundles. |
includes
|
Links one or more classes to the resulting application SWF file, whether or not those classes are required at compile time. To link an entire SWC file rather than individual classes, use the |
incremental=true|false
|
Enables incremental compilation. For more information, see About incremental compilation. This option is |
keep-as3-metadata=
|
Specifies metadata that you want to keep. By default, the compiler keeps the following metadata:
If you want to preserve the default metadata, you should use the += operator to append your new metadata, rather than the = operator which replaces the default metadata. This is an advanced option. |
|
|
Instructs the compiler to keep a style sheet's type selector in a SWF file, even if that type (the class) is not used in the application. This is useful when you have a modular application that loads other applications. For example, the loading SWF file might define a type selector for a type used in the loaded (or, target) SWF file. If you set this option to This is an advanced option. |
keep-generated-actionscript=true|false
|
Determines whether to keep the generated ActionScript class files. The generated class files include stubs and classes that are generated by the compiler and used to build the SWF file. When using the application compiler, the default location of the files is the /generated subdirectory, which is directly below the target MXML file. If the /generated directory does not exist, the compiler creates one. When using the compc component compiler, the default location of the /generated directory is relative to the output of the SWC file. When using Flex Builder, the default location of the generated files is the /bin/generated directory. The default names of the primary generated class files are filename-generated.as and filename-interface.as. The default value is This is an advanced option. |
language code
|
Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
lazy-init=true|false
|
Enables ABC bytecode lazy initialization. The default value is This is an advanced option. <<THIS OPTION IS NOW HIDDEN>> |
library-path
|
Links SWC files to the resulting application SWF file. The compiler only links in those classes for the SWC file that are required. The default value of the To point to individual classes or packages rather than entire SWC files, use the If you set the value of the On the command line, you use the += operator to append the new argument to the list of existing SWC files. In a configuration file, you can set the |
license product_name license_key
|
Defines the license key to use when compiling. Valid values for |
link-report filename
|
Prints linking information to the specified output file. This file is an XML file that contains The file format output by this command can be used to write a file for input to the load-externs option. For more information on the report, see Examining linker dependencies. This is an advanced option. |
load-config
|
Specifies the location of the configuration file that defines compiler options. If you specify a configuration file, you can override individual options by setting them on the command line. All relative paths in the configuration file are relative to the location of the configuration file itself. Use the For more information on using configuration files to provide options to the command-line compilers, see About configuration files. |
load-externs
|
Specifies the location of an XML file that contains This option provides compile-time link checking for external components that are dynamically linked. For more information about dynamic linking, see About linking. This is an advanced option. |
locale
|
Specifies the locale that should be packaged in the SWF file (for example, en_EN). You run the mxmlc compiler multiple times to create SWF files for more than one locale, with only the You must also include the parent directory of the individual locale directories, plus the token mxmlc -locale en_EN -source-path locale/{locale} MainApp.mxml
For more information, see Localizing Flex Applicationsin Flex 2 Developer's Guide. |
localized-description
|
Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
localized-title text lang
|
Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
namespaces.namespace
|
Specifies a namespace for the MXML file. You must include a URI and the location of the manifest file that defines the contents of this namespace. This path is relative to the MXML file. For more information about manifest files, see About manifest files. |
optimize=true|false
|
Enables the ActionScript optimizer. This optimizer reduces file size and increases performance by optimizing the SWF file's bytecode. The default value is |
output
|
Specifies the output path and filename for the resulting file. If you omit this option, the compiler saves the SWF file to the directory where the target file is located. The default SWF filename matches the target filename, but with a SWF file extension. If you use a relative path to define the filename, it is always relative to the current working directory, not the target MXML application root. The compiler creates extra directories based on the specified filename if those directories are not present. When using this option with the component compiler, the output is a SWC file rather than a SWF file. |
publisher
|
Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
raw-metadata XML_
|
Defines the metadata for the resulting SWF file. The value of this option overrides any metadata.* compiler options (such as This is an advanced option. |
resource-bundle-list
|
Prints a list of resource bundles to input to the compc compiler to create a resource bundle SWC file. The For more information, see Localizing Flex Applications in Flex 2 Developer's Guide. |
runtime-shared-libraries
|
Specifies a list of run-time shared libraries (RSLs) to use for this application. RSLs are dynamically-linked at run time. You specify the location of the SWF file relative to the deployment location of the application. For example, if you store a file named library.swf file in the web_root/libraries directory on the web server, and the application in the web root, you specify libraries/library.swf. For more information about RSLs, see Using Runtime Shared Libraries. |
services
|
Specifies the location of the services-config.xml file. This file is used by Flex Data Services. |
show-binding-warnings=true|false
|
Shows a warning when Flash Player cannot detect changes to a bound property. The default value is For more information about compiler warnings, see Using SWC files. |
show-actionscript-warnings=true|false
|
Shows warnings for ActionScript classes. The default value is For more information about viewing warnings and errors, see Viewing warnings and errors. |
show-deprecation-warnings=true|false
|
Shows deprecation warnings for Flex components. To see warnings for ActionScript classes, use the The default value is For more information about viewing warnings and errors, see Viewing warnings and errors. |
show-unused-type-selector-warnings=true|false
|
Shows warnings when a type selector in a style sheet or |
source-path
|
Adds directories or files to the source path. The Flex compiler searches directories in the source path for MXML or AS source files that are used in your Flex applications and includes those that are required at compile time. You can use wildcards to include all files and subdirectories of a directory. To link an entire library SWC file and not individual classes or directories, use the The source path is also used as the search path for the component compiler's You can also use the += operator to append the new argument to the list of existing source path entries. This option has the following default behavior:
|
strict=true|false
|
Prints undefined property and function calls; also performs compile-time type checking on assignments and options supplied to method calls. The default value is For more information about viewing warnings and errors, see Viewing warnings and errors. |
theme
|
Specifies a list of theme files to use with this application. Theme files can be SWC files with CSS files inside them or CSS files. For information on compiling a SWC theme file, see Using Styles and Themes in Flex 2 Developer's Guide. |
title
|
Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
use-network=true|false
|
Specifies that the current application uses network services. The default value is When the For more information about the |
use-resource-bundle-metadata=true|false
|
Enables resource bundles. Set to The default value is For more information, see Localizing Flex Applications in Flex 2 Developer's Guide. This is an advanced option. |
verbose-stacktraces=true|false
|
Generates source code that includes line numbers. When a run-time error occurs, the stacktrace shows these line numbers. Enabling this option generates larger SWF files. Enabling this option does not generate a debug SWF file. To do that, you must set the The default value is |
version
|
Returns the version number of the MXML compiler. If you are using a trial or Beta version of Flex, the version option also returns the number of days remaining in the trial period and the expiration date. |
warn-warning_type=true|false
|
Enables specified warnings. For more information, see Viewing warnings and errors. |
warnings=true|false
|
Enables all warnings. Set to The default value is |
The following sections provide examples of using the mxmlc application compiler options on the command line. You can also use these techniques with the application compilers in the Flex Builder and web-tier environments.
Flex 2.01