The table below shows a list of all the attributes the flex2ant mxmlc task supports. The left column shows the original MXMLC compiler option. The second column shows the mxmlc task attribute name. This attribute name usually equals the alias name of the original compiler option (see column on the right). The third column shows the type of the attribute expected by the mxmlc task. The fourth, most right, column shows the discription of the MXMLC compiler option. All descriptions are taken from the original compiler documentation.
When specifying compiler parameters for the MXMLC compiler, some compiler options are repeatable. This basically means that you can specify more than one value for this parameter. A good example of a repeatable parameter is the sourcePath parameter with which you can specify paths to folders that hold packages you might want to make available to your application.
Since version 0.0.3, flex2ant also allows you to include repeatable parameters by seperating the parameters by a semi-colon. The example on the tutorials page demonstrates this on the sourcePath parameter. Please beware that some operating system do not handle the usage of spaces in paths very well. While testing on Windows we didn't seem to experience any problems with using spaces in folder names. However, on Linux we were unable to get spaces in folders working correctly.
For more information on using the Flex 2 SDK command line compiler and the options that are available on using it, please refer to the Adobe LiveDocs. If you find any inconsistencies or just plain mistakes in the following table then please don't hesitate to contact the flex2ant team at info {at} flex2ant {dot} org.
| MXML compiler option | flex2ant mxmlc task attribute | type | Meaning |
|---|---|---|---|
| -benchmark | benchmark | boolean | output performance benchmark |
| -compiler.accessible | accessible | boolean | alias -accessible generate an accessible SWF |
| -compiler.actionscript-file-encoding | actionscriptFileEncoding | string | alias -actionscript-file-encoding specifies actionscript file encoding. If there is no BOM in the AS3 source files, the compiler will use this file encoding. |
| -compiler.allow-source-path-overlap | allowSourcePathOverlap | boolean | alias -allow-source-path-overlap (advanced) |
| -compiler.as3 | AS3 | boolean | alias -as3 uses the AS3 compatibility mode. default is true. Either -as3 or -es3 must be 'true'. |
| -compiler.context-root <context-path> | contextRoot | string | alias -context-root path to replace {context.root} tokens for service channel endpoints |
| -compiler.debug | debug | boolean | alias -debug |
| -compiler.defaults-css-url <string> | defaultsCSSUrl | string | alias -defaults-css-url (advanced) |
| -compiler.defaults-css-url <string> | defaultsCSSUrl | string | alias -defaults-css-url (advanced) |
| -compiler.doc | doc | boolean | alias -doc (advanced) |
| -compiler.es3 | ES3 | boolean | alias -es3 uses the ES3 compatibility mode. default is false. |
| -compiler.external-library-path [path-element] [...] | externalLibraryPath | string | alias -el list of SWC files or directories to compile against but to omit from linking (repeatable) |
| -compiler.fonts.languages.language-range |
languageRange | string | alias -language-range a range to restrict the number of font glyphs embedded into the SWF (advanced, repeatable) |
| -compiler.fonts.managers [manager-class] [...] | managers | string | alias -managers Compiler font manager classes, in policy resolution order (advanced) |
| -compiler.fonts.max-cached-fonts <string> | maxCachedFonts | string | alias -max-cached-fonts (advanced) |
| -compiler.fonts.max-glyphs-per-face <string> | maxGlyphsPerFace | string | alias -max-glyphs-per-face (advanced) |
| -compiler.fonts.system-search-path [path-element] [...] | systemSearchPath | string | alias -system-search-path (advanced, repeatable) |
| -compiler.headless-server | headlessServer | boolean | alias -headless-server a flag to set when Flex is running on a server without a display (advanced) |
| -compiler.include-libraries [library] [...] | includeLibraries | string | alias -include-libraries a list of libraries (SWCs) to completely include in the SWF (repeatable) |
| -compiler.incremental | incremental | boolean | alias -incremental enables incremental compilation |
| -compiler.keep-all-type-selectors | keepAllTypeSelectors | boolean | alias -keep-all-type-selectors disables the pruning of unused type selectors (advanced) |
| -compiler.keep-generated-actionscript | keep | boolean | alias -keep save temporary source files generated during MXML compilation (advanced) |
| -compiler.library-path [path-element] [...] | libraryPath | string | alias -l list of SWC files or directories that contain SWC files (repeatable) |
| -compiler.locale <string> | locale | string | alias -locale specifies the locale for internationalization |
| -compiler.namespaces.namespace |
namespace | string | alias -namespace Specify a URI to associate with a manifest of components for use as MXML elements (repeatable) |
| -compiler.optimize | optimize | boolean | alias -optimize Enable post-link SWF optimization |
| -compiler.profile | profile | boolean | alias -profile generate a movie that is suitable for performance profiling |
| -compiler.services |
services | string | alias -services path to Flex Data Services configuration file |
| -compiler.show-binding-warnings | showBindingWarnings | boolean | alias -show-binding-warnings toggle whether warnings generated from data binding code are displayed |
| -compiler.show-coach-warnings | showCoachWarnings | boolean | alias -show-coach-warnings runs the AS3 compiler in a mode that detects legal but potentially incorrect code |
| -compiler.show-dependency-warnings | showDependencyWarnings | boolean | alias -show-dependency-warnings show warnings when dependencies cannot be determined at compile time (advanced) |
| -compiler.show-deprecation-warnings | showDeprecationWarnings | boolean | alias -show-deprecation-warnings toggle whether the use of deprecated APIs generates a warning |
| -compiler.source-path [path-element] [...] | sourcePath | string | alias -sp list of path elements that form the roots of ActionScript class hierarchies (repeatable) |
| -compiler.strict | strict | boolean | alias -strict runs the AS3 compiler in strict error checking mode. strict must be 'false' when es3 is 'true'. |
| -compiler.theme [filename] [...] | theme | string | alias -theme list of CSS or SWC files to apply as a theme (repeatable) |
| -compiler.use-resource-bundle-metadata | useResourceBundleMetadata | boolean | alias -use-resource-bundle-metadata |
| -compiler.verbose-stacktraces | verboseStackTraces | boolean | alias -verbose-stacktraces save callstack information to the SWF for debugging (advanced) |
| -compiler.warn-array-tostring-changes | warnArrayToStringChanges | boolean | alias -warn-array-tostring-changes (advanced) |
| -compiler.warn-assigning-undefined-to-non-object-type | warnAssigningUndefinedToNonObjectType | boolean | alias -warn-assigning-undefined-to-non-object-type (advanced) |
| -compiler.warn-bad-type-cast | warnBadTypeCast | boolean | alias -warn-bad-type-cast (advanced) |
| -compiler.warn-bad-undefined-comparison | warnBadUndefinedComparison | boolean | alias -warn-bad-undefined-comparison (advanced) |
| -compiler.warn-boolean-constructor-with-no-args | warnBooleanConstructorWithNoArgs | boolean | alias -warn-boolean-constructor-with-no-args (advanced) |
| -compiler.warn-class-is-sealed | warnClassIsSealed | boolean | alias -warn-class-is-sealed (advanced) |
| -compiler.warn-constructor-returns-value | warnConstructorReturnsValue | boolean | alias -warn-constructor-returns-value (advanced) |
| -compiler.warn-deprecated-event-handler-error | warnDeprecatedEventHandlerError | boolean | alias -warn-deprecated-event-handler-error (advanced) |
| -compiler.warn-deprecated-function-error | warnDeprecatedFunctionError | boolean | alias -warn-deprecated-function-error (advanced) |
| -compiler.warn-deprecated-property-error | deprecatedPropertyError | boolean | alias -warn-deprecated-property-error (advanced) |
| -compiler.warn-duplicate-func-def | warnDuplicateFuncDef | boolean | alias -warn-duplicate-func-def (advanced) |
| -compiler.warn-for-var-in-changes | warnForVarInChanges | boolean | alias -warn-for-var-in-changes (advanced) |
| -compiler.warn-function-parameter-declared-as-void | warnFunctionParameterDeclaredAsVoid | boolean | alias -warn-function-parameter-declared-as-void (advanced) |
| -compiler.warn-math-expressions-treat-null-like-zero | warnMathExpressionsTreatNullLikeZero | boolean | alias -warn-math-expressions-treat-null-like-zero (advanced) |
| -compiler.warn-missing-namespace-decl | warnMissingNamespaceDecl | boolean | alias -warn-missing-namespace-decl (advanced) |
| -compiler.warn-no-constructor | warnNoContructor | boolean | alias -warn-no-constructor (advanced) |
| -compiler.warn-no-explicit-super-call-in-constructor | warnNoExplicitSuperCallInConstructor | boolean | alias -warn-no-explicit-super-call-in-constructor (advanced) |
| -compiler.warn-no-type-decl | warnNoTypeDecl | boolean | alias -warn-no-type-decl (advanced) |
| -compiler.warn-scoping-change-in-this | warnScopingChangeInThis | boolean | alias -warn-scoping-change-in-this (advanced) |
| -compiler.warn-super-only-works-for-class-objects | warnSuperOnlyWorksForClassObjects | boolean | alias -warn-super-only-works-for-class-objects (advanced) |
| -compiler.warn-undefined-function | warnUndefinedFunction | boolean | alias -warn-undefined-function (advanced) |
| -compiler.warn-undefined-reference | warnUndefinedReference | boolean | alias -warn-undefined-reference (advanced) |
| -compiler.warn-var-hidden-by-function | warnVarHiddenByFunction | boolean | alias -warn-var-hidden-by-function (advanced) |
| -compiler.warn-wrong-arg-type | warnWrongArgType | boolean | alias -warn-wrong-arg-type (advanced) |
| -compiler.warn-wrong-number-of-args | warnWrongNumberOfArgs | boolean | alias -warn-wrong-number-of-args (advanced) |
| -compiler.warn-xml-class-has-changed | warnXMLClassHasChanged | boolean | alias -warn-xml-class-has-changed (advanced) |
| -debug-password <string> | debugPassword | string | the password to include in debuggable SWFs (advanced) |
| -default-background-color <int> | defaultBackgroundColor | int | default background color (may be overridden by the application code) (advanced) |
| -default-frame-rate <int> | defaultFrameRate | int | default frame rate to be used in the SWF. (advanced) |
| -default-script-limits |
defaultScriptLimits | string | default script execution limits (may be overridden by root attributes) (advanced) |
| -default-size <width> <height> | defaultSize | string | default application size (may be overridden by root attributes in the application) (advanced) |
| -dump-config |
dumpConfig | string | write a file containing all currently set configuration values in a format suitable for use as a flex config file (advanced) |
| -externs [symbol] [...] | externs | string | a list of symbols to omit from linking when building a SWF (advanced, repeatable) |
| -file-specs [path-element] [...] | fileSpecs | string | a list of source files to compile, the last file specified will be used as the target application (repeatable, default variable) |
| -frames.frame [label] [classname] [...] | frame | string | alias -frame A SWF frame label with a sequence of classnames that will be linked onto the frame. (advanced, repeatable) |
| -help [keyword] [...] | help | string | keywords are 'syntax', 'list', 'advanced', 'aliases', 'details', or a search term |
| -includes [symbol] [...] | includes | string | a list of symbols to always link in when building a SWF (advanced, repeatable) |
| -lazy-init | lazyInit | boolean | Enable/Disable ABC bytecode lazy initialization (advanced) |
| -licenses.license <product%gt; <serial-number> | license | string | alias -license (repeatable) |
| -link-report <filename> | linkReport | string | Output a XML-formatted report of all definitions linked into the application. (advanced) |
| -load-config <filename> | loadConfig | string | load a file containing configuration options (repeatable) |
| -load-externs <filename> | loadExterns | string | an XML file containing <def>, <pre>, and <ext> symbols to omit from linking when building a SWF (advanced, repeatable) |
| -metadata.contributor <name> | contributor | string | alias -contributor A contributor's name to store in the SWF metadata (repeatable) |
| -metadata.creator <name> | creator | string | alias -creator A creator's name to store in the SWF metadata (repeatable) |
| -metadata.date <text> | date | string | alias -date The creation date to store in the SWF metadata |
| -metadata.description <text> | description | string | alias -description The default description to store in the SWF metadata |
| -metadata.language <code> | language | string | alias -language The language to store in the SWF metadata (i.e. EN, FR) (repeatable) |
| -metadata.localized-description <text> <lang> | localizedDescription | string | alias -localized-description A localized RDF/XMP description to store in the SWF metadata (repeatable) |
| -metadata.localized-title <title> <lang> | localizedTitle | string | alias -localized-title A localized RDF/XMP title to store in the SWF metadata (repeatable) |
| -metadata.publisher <name> | publisher | string | alias -publisher A publisher's name to store in the SWF metadata (repeatable) |
| -metadata.title <text> | title | string | alias -title The default title to store in the SWF metadata |
| -output <filename> | output | string | alias -o the filename of the SWF movie to create |
| -raw-metadata <text> | rawMetadata | string | XML text to store in the SWF metadata (overrides metadata.* configuration) (advanced) |
| -resource-bundle-list <filename> | resourceBundleList | string | (advanced) |
| -runtime-shared-libraries [url] [...] | RSL | string | alias -rsl a list of runtime shared library URLs to be loaded before the application starts (repeatable) |
| -use-network | useNetwork | boolean | toggle whether the SWF is flagged for access to network resources |
| -version | version | boolean | display the build version of the program |
| -warnings | warnings | boolean | toggle the display of warnings |