常见Flex编译器参数汇总
verbose-stacktraces
此Flex编译器参数指定SWF在运行时异常信息中包含行号和文件名,这将使产生的SWF文件更大些,带verbose-stacktraces的SWF还是和调试版本的SWF有区别的。
source-pathpath-element
添加其他源代码目录或文件,可以使用通配符来添加目录中所有文件或子目录,也可使用+=在默认路径上来追加新参数,例如-source-path+=/Users/base/Project
include-libraries
此Flex编译器参数指定SWF文件被编译到程序中并链接库中所有类和资源到SWF上。如果你的程序需要加载其他模块这个参数就很有用了。
library-path
跟include-libraries选项类似,但是只引用类和资源以供SWF使用,这样可保持SWF文件的可管理性。
locale
此Flex编译器参数指定SWF文件的区域属性,例如使用-locale=es_ES指定SWF区域为西班牙
use-network
此Flex编译器参数指示SWF是否可以访问网络服务或者应用标准的FlashPlayer权限策略。例如-usenetwork=false指定SWF有本地文件系统访问权但不能访问任何网络服务,默认为true
frames.frame
启动应用程序资源代理流,然后通过ModuleManager类公布其接口,在特殊情况下,比如在代码中已经引入资源但是并不需要移动资源到外部SWF文件,这时此参数可使应用程序启动时间大大减少,这是一个很复杂但很有用的参数。
keep-all-type-selectors
保证所有样式信息都被编译进SWF,甚至是程序没有用到的。这点非常重要,因为有可能程序加载的其他组件需要这些样式信息。默认值为false,也就是说没有用到的样式信息不会被编译进SWF。设置好编译器参数后,点击Apply按钮保存。
下面是所有的编译参数:
Adobe Flex Compiler (mxmlc)
Version 3.4.0 build 6955Copyright (c) 2004-2007 Adobe Systems, Inc. All rights reserved.
-benchmark
output performance benchmark
-compiler.accessible
alias -accessible
generate an accessible SWF
-compiler.actionscript-file-encoding <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.context-root <context-path>
alias -context-root
path to replace {context.root} tokens for service channel endpoints
-compiler.debug
alias -debug
generates a movie that is suitable for debugging
-compiler.external-library-path [path-element] [...]
alias -external-library-path
list of SWC files or directories to compile against but to omit from
linking (repeatable)——引用的SWC库文件
-compiler.fonts.advanced-anti-aliasing
alias -advanced-anti-aliasing
enables advanced anti-aliasing for embedded fonts, which provides
greater clarity for small fonts.
-compiler.fonts.flash-type
alias -flash-type
enables FlashType for embedded fonts, which provides greater clarity
for small fonts.
-compiler.fonts.max-glyphs-per-face <string>
alias -max-glyphs-per-face
sets the maximum number of character glyph-outlines to keep in the
server cache for each font face. The default value is 1000.
-compiler.include-libraries [library] [...]
alias -include-libraries
a list of libraries (SWCs) to completely include in the SWF
(repeatable)
-compiler.incremental
alias -incremental
enables incremental compilation 加快命令行编译速度,在Flash Builder是默认打开的
-compiler.keep-all-type-selectors
alias -keep-all-type-selectors
disables the pruning of unused CSS type selectors (advanced)
-compiler.keep-as3-metadata [name] [...]
alias -keep-as3-metadata
keep the specified metadata in the SWF (advanced, repeatable)
-compiler.keep-generated-actionscript
alias -keep-generated-actionscript
save temporary source files generated during MXML compilation
(advanced)——保存Flex编译MXML过程中产生的临时AS源文件
-compiler.library-path [path-element] [...]
alias -l
list of SWC files or directories that contain SWC files (repeatable)
-compiler.locale [locale-element] [...]
alias -locale
specifies the locale for internationalization (repeatable)
-compiler.mxml.compatibility-version <version>
alias -compatibility-version
specifies a compatibility version. e.g. -compatibility-version=2.0.1
-compiler.namespaces.namespace <uri> <manifest>
alias -namespace
Specify a URI to associate with a manifest of components for use as
MXML elements (repeatable)
-compiler.optimize
alias -optimize
Enable post-link SWF optimization
-compiler.services <filename>
alias -services
path to Flex Data Services configuration file
-compiler.show-actionscript-warnings
alias -show-actionscript-warnings
runs the AS3 compiler in a mode that detects legal but potentially
incorrect code
-compiler.show-binding-warnings
alias -show-binding-warnings
toggle whether warnings generated from data binding code are
displayed
-compiler.show-shadowed-device-font-warnings
alias -show-shadowed-device-font-warnings
toggles whether warnings are displayed when an embedded font name
shadows a device font name
-compiler.show-unused-type-selector-warnings
alias -show-unused-type-selector-warnings
toggle whether warnings generated from unused CSS type selectors are
displayed
-compiler.source-path [path-element] [...]
alias -sp
list of path elements that form the roots of ActionScript class
hierarchies (repeatable)
-compiler.strict
alias -strict
runs the AS3 compiler in strict error checking mode.在Flash Builder的工程属性里面可以设置。强制编译器进入strict模式, 在Strict模式下,编译器对代码要求较高
-compiler.theme [filename] [...]
alias -theme
list of CSS or SWC files to apply as a theme (repeatable)
-compiler.use-resource-bundle-metadata
alias -use-resource-bundle-metadata
determines whether resources bundles are included in the application.
-compiler.verbose-stacktraces
alias -verbose-stacktraces
save callstack information to the SWF for debugging (advanced)
-compiler.warn-array-tostring-changes
alias -warn-array-tostring-changes
Array.toString() format has changed. (advanced)
-compiler.warn-assignment-within-conditional
alias -warn-assignment-within-conditional
Assignment within conditional. (advanced)
-compiler.warn-bad-array-cast
alias -warn-bad-array-cast
Possibly invalid Array cast operation. (advanced)
-compiler.warn-bad-bool-assignment
alias -warn-bad-bool-assignment
Non-Boolean value used where a Boolean value was expected. (advanced)
-compiler.warn-bad-date-cast
alias -warn-bad-date-cast
Invalid Date cast operation. (advanced)
-compiler.warn-bad-es3-type-method
alias -warn-bad-es3-type-method
Unknown method. (advanced)
-compiler.warn-bad-es3-type-prop
alias -warn-bad-es3-type-prop
Unknown property. (advanced)
-compiler.warn-bad-nan-comparison
alias -warn-bad-nan-comparison
Illogical comparison with NaN. Any comparison operation involving NaN
will evaluate to false because NaN != NaN. (advanced)
-compiler.warn-bad-null-assignment
alias -warn-bad-null-assignment
Impossible assignment to null. (advanced)
-compiler.warn-bad-null-comparison
alias -warn-bad-null-comparison
Illogical comparison with null. (advanced)
-compiler.warn-bad-undefined-comparison
alias -warn-bad-undefined-comparison
Illogical comparison with undefined. Only untyped variables (or
variables of type *) can be undefined. (advanced)
-compiler.warn-boolean-constructor-with-no-args
alias -warn-boolean-constructor-with-no-args
Boolean() with no arguments returns false in ActionScript 3.0.
Boolean() returned undefined in ActionScript 2.0. (advanced)
-compiler.warn-changes-in-resolve
alias -warn-changes-in-resolve
__resolve is no longer supported. (advanced)
-compiler.warn-class-is-sealed
alias -warn-class-is-sealed
Class is sealed. It cannot have members added to it dynamically.
(advanced)
-compiler.warn-const-not-initialized
alias -warn-const-not-initialized
Constant not initialized. (advanced)
-compiler.warn-constructor-returns-value
alias -warn-constructor-returns-value
Function used in new expression returns a value. Result will be what
the function returns, rather than a new instance of that function.
(advanced)
-compiler.warn-deprecated-event-handler-error
alias -warn-deprecated-event-handler-error
EventHandler was not added as a listener. (advanced)
-compiler.warn-deprecated-function-error
alias -warn-deprecated-function-error
Unsupported ActionScript 2.0 function. (advanced)
-compiler.warn-deprecated-property-error
alias -warn-deprecated-property-error
Unsupported ActionScript 2.0 property. (advanced)
-compiler.warn-duplicate-argument-names
alias -warn-duplicate-argument-names
More than one argument by the same name. (advanced)
-compiler.warn-duplicate-variable-def
alias -warn-duplicate-variable-def
Duplicate variable definition (advanced)
-compiler.warn-for-var-in-changes
alias -warn-for-var-in-changes
ActionScript 3.0 iterates over an object's properties within a "for x
in target" statement in random order. (advanced)
-compiler.warn-import-hides-class
alias -warn-import-hides-class
Importing a package by the same name as the current class will hide
that class identifier in this scope. (advanced)
-compiler.warn-instance-of-changes
alias -warn-instance-of-changes
Use of the instanceof operator. (advanced)
-compiler.warn-internal-error
alias -warn-internal-error
Internal error in compiler. (advanced)
-compiler.warn-level-not-supported
alias -warn-level-not-supported
_level is no longer supported. For more information, see the
flash.display package. (advanced)
-compiler.warn-missing-namespace-decl
alias -warn-missing-namespace-decl
Missing namespace declaration (e.g. variable is not defined to be
public, private, etc.). (advanced)
-compiler.warn-negative-uint-literal
alias -warn-negative-uint-literal
Negative value will become a large positive value when assigned to a
uint data type. (advanced)
-compiler.warn-no-constructor
alias -warn-no-constructor
Missing constructor. (advanced)
-compiler.warn-no-explicit-super-call-in-constructor
alias -warn-no-explicit-super-call-in-constructor
The super() statement was not called within the constructor.
(advanced)
-compiler.warn-no-type-decl
alias -warn-no-type-decl
Missing type declaration. (advanced)
-compiler.warn-number-from-string-changes
alias -warn-number-from-string-changes
In ActionScript 3.0, white space is ignored and '' returns 0.
Number() returns NaN in ActionScript 2.0 when the parameter is '' or
contains white space. (advanced)
-compiler.warn-scoping-change-in-this
alias -warn-scoping-change-in-this
Change in scoping for the this keyword. Class methods extracted from
an instance of a class will always resolve this back to that
instance. In ActionScript 2.0 this is looked up dynamically based on
where the method is invoked from. (advanced)
-compiler.warn-slow-text-field-addition
alias -warn-slow-text-field-addition
Inefficient use of += on a TextField. (advanced)
-compiler.warn-unlikely-function-value
alias -warn-unlikely-function-value
Possible missing parentheses. (advanced)
-compiler.warn-xml-class-has-changed
alias -warn-xml-class-has-changed
Possible usage of the ActionScript 2.0 XML class. (advanced)
-debug-password <string>
the password to include in debuggable SWFs (advanced)
-default-background-color <int>
default background color (may be overridden by the application code)
(advanced)
-default-frame-rate <int>
default frame rate to be used in the SWF. (advanced)
-default-script-limits <max-recursion-depth> <max-execution-time>
default script execution limits (may be overridden by root
attributes) (advanced)
-default-size <width> <height>
default application size (may be overridden by root attributes in the
application) (advanced)
-dump-config <filename>
write a file containing all currently set configuration values in a
format suitable for use as a flex config file (advanced)
-externs [symbol] [...]
a list of symbols to omit from linking when building a SWF (advanced,
repeatable)
-frames.frame [label] [classname] [...]
alias -frame
A SWF frame label with a sequence of classnames that will be linked
onto the frame. (advanced, repeatable)
-help [keyword] [...]
keywords are 'syntax', 'list', 'advanced', 'aliases', 'details', or a
search term (-help -list -advanced -details)
-include-resource-bundles [bundle] [...]
a list of resource bundles to include in the output SWC (repeatable)
-includes [symbol] [...]
a list of symbols to always link in when building a SWF (advanced,
repeatable)
-licenses.license <product> <serial-number>
alias -license
specifies a product and a serial number. (repeatable)
-link-report <filename>
Output a XML-formatted report of all definitions linked into the
application. (advanced)
-load-config <filename>
load a file containing configuration options (repeatable)
-load-externs <filename>
an XML file containing <def>, <pre>, and <ext> symbols to omit from
linking when building a SWF (advanced, repeatable)
-metadata.contributor <name>
alias -contributor
A contributor's name to store in the SWF metadata (repeatable)
-metadata.creator <name>
alias -creator
A creator's name to store in the SWF metadata (repeatable)
-metadata.date <text>
alias -date
The creation date to store in the SWF metadata
-metadata.description <text>
alias -description
The default description to store in the SWF metadata
-metadata.language <code>
alias -language
The language to store in the SWF metadata (i.e. EN, FR) (repeatable)
-metadata.localized-description <text> <lang>
alias -localized-description
A localized RDF/XMP description to store in the SWF metadata
(repeatable)
-metadata.localized-title <title> <lang>
alias -localized-title
A localized RDF/XMP title to store in the SWF metadata (repeatable)
-metadata.publisher <name>
alias -publisher
A publisher's name to store in the SWF metadata (repeatable)
-metadata.title <text>
alias -title
The default title to store in the SWF metadata
-output <filename>
alias -o
the filename of the SWF movie to create
-raw-metadata <text>
XML text to store in the SWF metadata (overrides metadata.*
configuration) (advanced)
-resource-bundle-list <filename>
prints a list of resource bundles to a file for input to the compc
compiler to create a resource bundle SWC file. (advanced)
-runtime-shared-libraries [url] [...]
alias -rsl
a list of runtime shared library URLs to be loaded before the
application starts (repeatable)
-runtime-shared-library-path [path-element] [rsl-url] [policy-file-url] [rsl-url
] [policy-file-url]
alias -rslp
(repeatable)
-static-link-runtime-shared-libraries
alias -static-rsls
statically link the libraries specified by the
-runtime-shared-libraries-path option.
-target-player <version>
specifies the version of the player the application is targeting.
Features requiring a later version will not be compiled into the
application. The minimum value supported is "9.0.0".
-use-network
toggle whether the SWF is flagged for access to network resources
-verify-digests
verifies the libraries loaded at runtime are the correct ones.
(advanced)
-version
display the build version of the program
-warnings
toggle the display of warnings
常用参数:
Option | Description |
---|---|
accessible=true|false | Enables accessibility features when compiling the Flex application or SWC file. The default value is false. For more information on using the Flex accessibility features, see Creating Accessible Applications in Adobe Flex 3 Developer Guide. |
actionscript-file-encoding string | 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 advancedThis is an advanced option. |
allow-source-path-overlap=true|false | Checks if a source-path entry is a subdirectory of another source-path entry. It helps make the package names of MXML components unambiguous. 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 true. If you set this value to false, you must set the es option to true. This is an advanced option. |
benchmark=true|false | Prints detailed compile times to the standard output. The default value is true. |
context-root context-path | Sets the value of the {context.root} token, which is often used in channel definitions in the flex-services.xml file and other settings in the flex-config.xml file. The default value is null. |
contributor name | Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
creator name | Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
date text | 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 used by the command-line debugger and the Flex Builder debugger. Enabling the debug option generates larger SWF files. For the mxmlc compiler, the default value is false. For the compc compiler, the default value is true. For Flex Builder, the default value is true. If you export an application by using the Export Release Build feature, the Flex Builder compiler excludes the debugging information, which is the equivalent of setting the value of this option to false. When generating SWC files, if debug is set to true, then the library.swf file inside the SWC file contains debug information. If you are generating a SWC file for distribution, set this value to false. For information about the command-line debugger, see Using the Command-Line Debugger. If you set this option to true, Flex also sets the verbose-stacktraces option totrue |
debug-password string | Lets you engage in remote debugging sessions with the Flash IDE. This is an advanced option. |
default-background-color int | Sets the application's background color. You use the 0x notation to set the color, as the following example shows: -default-background-color=0xCCCCFFThe 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 default-background-color option to be visible. For more information, see Editing application settings. 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 max-recursion-depth max-execution-time | Defines the application's script execution limits. The max-recursion-depth value specifies the maximum depth of Adobe Flash Player call stack before Flash Player stops. This is essentially the stack overflow limit. The default value is 1000. The max-execution-time value specifies the maximum duration, in seconds, that an ActionScript event handler can execute before Flash Player assumes that it is hung, and aborts it. The default value is 60 seconds. You cannot set this value above 60 seconds. You can override these settings in the application. This is an advanced option. |
default-size width height | Defines the default application size, in pixels. This is an advanced option. |
defaults-css-files filename [, ...] | Inserts CSS files into the output the same way that a per-SWC defaults.css file works, but without having to re-archive the SWC file to test each change. CSS files included in the output with this option have a higher precedence than default CSS files in existing SWCs. For example, a CSS file included with this option overrides definitions in framework.swc's defaults.css file, but it has the same overall precedence as other included CSS files inside the SWC file. This option does not actually insert the CSS file into the SWC file; it simulates it. When you finish developing the CSS file, you should rebuild the SWC file with the new integrated CSS file. This option takes one or more files. The precedence for multiple CSS files included with this option is from first to last. This is an advanced option. |
defaults-css-url string | 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 Adobe Flex 3 Developer Guide. This is an advanced option. |
define=NAMESPACE::variable,value | Defines a global constant. The value is evaluated at compile time and exists as a constant within the application. A common use of inline constants is to set values that are used to include or exclude blocks of code, such as debugging or instrumentation code. This is known as conditional compilation. The following example defines the constant debugging in the CONFIG namespace: -define=CONFIG::debugging,trueIn ActionScript, you can use this value to conditionalize statements; for example: CONFIG::debugging { // Execute debugging code here. }To set multiple conditionals on the command-line, use the define option more than once. For more information, see Using conditional compilation. |
description text | Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
dump-config filename | Outputs the compiler options in the flex-config.xml file to the target path; for example: mxmlc -dump-config myapp-config.xmlThis 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 false. 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 es compiler option to true, you must set the strict compiler option to false. Otherwise, the compiler will throw errors. If you set this option to true, you must also set the value of the as3 compiler option to false. This is an advanced option. |
externs class_name [...] | Sets a list of classes 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 path-element [...] | 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. By default, the libs/player/playerglobal.swc file is linked as an external library. This library is built into Flash Player. 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. |
fonts.advanced-anti-aliasing=true|false | Sets the default value that determines whether embedded fonts use advanced anti-aliasing information when rendering the font. Setting the value of the advanced-anti-aliasing property in a style sheet overrides this value. The default value is false. For more information about using advanced anti-aliasing, see Using Fonts in Adobe Flex 3 Developer Guide. |
fonts.languages.language-range lang range | Specifies the range of Unicode settings for that language. For more information, seeUsing Styles and Themes in Adobe Flex 3 Developer Guide. This is an advanced option. |
fonts.local-fonts-snapshot path_to_file | Sets the location of the local font snapshot file. The file contains system font data. This is an advanced option. |
fonts.managers manager-class [...] | 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 Adobe Flex 3 Developer Guide. This is an advanced option. |
fonts.max-cached-fonts string | Sets the maximum number of fonts to keep in the server cache. |
fonts.max-glyphs-per-face string | Sets the maximum number of character glyph-outlines to keep in the server cache for each font face. This is an advanced option. |
frames.frame label class_name [...] | 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, seeCommand-line syntax. |
include-libraries library [...] | 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 library-path option that includes only those classes that are referenced at compile time. To link one or more classes whether or not they are used and not an entire SWC file, use the includes option. This option is commonly used to specify resource bundles. |
include-resource-bundles bundle [...] | Specifies the resource bundles to link into a resource module. All resource bundles specified with this option must be in the compiler's source path. You specify this using the source-path compiler option. For more information on using resource bundles, see Localizing Flex Applications inAdobe Flex 3 Developer Guide. |
includes class [...] | 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 include-libraries option. |
incremental=true|false | Enables incremental compilation. For more information, see About incremental compilation. This option is true by default for the Flex Builder application compiler. For the command-line compiler, the default is false. The web-tier compiler uses incremental compilation by default. |
keep-as3-metadata=class_name [...] | Specifies custom 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 custom metadata, rather than the = operator which replaces the default metadata. This is an advanced option. For more information, see About metadata tags inCreating and Extending Adobe Flex 3 Components. |
keep-all-type-selectors=true|false | 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 true when compiling the loading SWF file, then the target SWF file will have access to that type selector when it is loaded. If you set this option tofalse, the compiler will not include that type selector in the loading SWF file at compile time. As a result, the styles will not be available to the target SWF file. 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 false. This is an advanced option. |
language code | Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
library-path path-element [...] | Links SWC files to the resulting application SWF file. The compiler only links in those classes for the SWC file that are required. You can specify a directory or individual SWC files. The default value of the library-path option includes all SWC files in the libs and libs/player directories, plus the current locale directory. These are required. To point to individual classes or packages rather than entire SWC files, use thesource-path option. If you set the value of the library-path as an option of the command-line compiler, you must also explicitly add the framework.swc and locale SWC files. Your new entry is not appended to the library-path but replaces it, unless you use the += operator. 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 append attribute of the library-path tag totrue to indicate that the values should be appended to the library path rather than replace existing default entries. |
license product_name license_key | Defines the license key to use when compiling. Valid values for product_nameinclude flexbuilder3. |
link-report filename | Prints linking information to the specified output file. This file is an XML file that contains <def>, <pre>, and <ext> symbols showing linker dependencies in the final SWF file. 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 filename | 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 += operator to chain this configuration file to other configuration files. For more information on using configuration files to provide options to the command-line compilers, see About configuration files. |
load-externs filename [...] | Specifies the location of an XML file that contains <def>, <pre>, and <ext> symbols to omit from linking when compiling a SWF file. The XML file uses the same syntax as the one produced by the link-report option. For more information on the report, see Examining linker dependencies. 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 string | Specifies one or more locales to be compiled into the SWF file. If you do not specify a locale, then the compiler uses the default locale from the flex-config.xml file. The default value is en_US. You can append additional locales to the default locale by using the += operator. If you remove the default locale from the flex-config.xml file, and do not specify one on the command line, then the compiler will use the machine's locale. For more information, see Localizing Flex Applicationsin Adobe Flex 3 Developer Guide. |
localized-description text lang | 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. |
mxml.compatibility-version=version | Specifies the version of the Flex compiler that the output should be compatible with. This option affects some behavior such as the layout rules, padding and gaps, skins, and other style settings. In addition, it affects the rules for parsing properties files. The currently-supported values are 3 and 2.0.1. The default value is 3. The following example instructs the application to compile with the 2.0.1 rules for these behaviors: -compatibility-version=2.0.1For more information on using the option, see Backward compatibility. |
namespaces.namespace uri manifest | 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 true. |
output filename | 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, unless you set the directory option to true. In that case, the output is a directory with the contents of the SWC file. The name of the directory is that value of the ouput option. |
publisher name | Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. |
raw-metadata XML_string | Defines the metadata for the resulting SWF file. The value of this option overrides any metadata.* compiler options (such as contributor, creator, date, anddescription). This is an advanced option. |
resource-bundle-list filename | Prints a list of resource bundles that are used by the current application to a file named with the filename argument. You then use this list as input that you specify with the include-resource-bundles option to create a resource module. For more information, see Localizing Flex Applications in Adobe Flex 3 Developer Guide. |
runtime-shared-libraries rsl-url [...] | Specifies a list of runtime shared libraries (RSLs) to use for this application. RSLs are dynamically-linked at run time. The compiler externalizes the contents of the application that you are compiling that overlap with the RSL. 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. |
runtime-shared-library-path=path- element,rsl-url[,policy-file- url,failover-url,...] | Specifies the location of a runtime shared library (RSL). The compiler externalizes the contents of the application that you are compiling that overlap with the RSL. The path-element argument is the location of the SWC file or open directory to compile against. For example, c:\flexsdk\frameworks\libs\framework.swc. This is the equivalent of the using the external-library-path option when compiling against an RSL using the runtime-shared-libraries option. The rsl-url argument is the URL of the RSL that will be used to load the RSL at runtime. The compiler does not verify the existence of the SWF file at this location at compile time. It does store this string in the application, however, and uses it at run time. As a result, the SWF file must be available at run time but necessarily not at compile time. The policy-file-url is the location of the crossdomain.xml file that gives permission to read the RSL from the server. This might be necessary because the RSL can be on a separate server as the application. For example, http://www.mydomain.com/rsls/crossdomain.xml. The failover-url and second policy-file-url arguments specify the location of the secondary RSL and crossdomain.xml file if the first RSL cannot be loaded. This most commonly happens when the client Player version does not support cross-domain RSLs. You can add any number of failover RSLs, but must include a policy file URL for each one. Do not include spaces between the comma-separated values. The following example shows how to use this option: mxmlc -o=../lib/app.swf -runtime-shared-library- path=../lib/mylib.swc,../bin/myrsl.swf Main.mxmlYou can specify more than one library file to be used as an RSL. You do this by adding additional runtime-shared-library-path options. You can also use the runtime-shared-libraries command to use RSLs with your Flex applications. However, the runtime-shared-library-path option lets you also specify the location of the policy file and failover RSL. For more information about RSLs, see Using Runtime Shared Libraries. |
services filename | Specifies the location of the services-config.xml file. This file is used by LiveCycle Data Services ES. |
show-actionscript-warnings=true|false | Shows warnings for ActionScript classes. The default value is true. For more information about viewing warnings and errors, see Viewing warnings and errors. |
show-binding-warnings=true|false | Shows a warning when Flash Player cannot detect changes to a bound property. The default value is true. For more information about viewing warnings and errors, see Viewing warnings and errors. |
show-shadowed-device-font- warnings=true|false | Shows warnings when you try to embed a font with a family name that is the same as the operating system font name. The compiler normally warns you that you are shadowing a system font. Set this option to false to disable the warnings. The default value is true. 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 <mx:Style> block is not used by any components in the application. The default value is true. For more information about viewing warnings and errors, see Viewing warnings and errors. |
source-path path-element [...] | Adds directories or files to the source path. The Flex compiler searches directories in the source path for MXML, AS, or CSS 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 thelibrary-path option. The source path is also used as the search path for the component compiler'sinclude-classes and include-resource-bundles options. 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:
|
static-link-runtime-shared- libraries=true|false | Determines whether to compile against libraries statically or use RSLs. Set this option to true to ignore the RSLs specified by the runtime-shared-library-pathoption. Set this option to false to use the RSLs. The default value is true. This option is useful so that you can quickly switch between a statically and dynamically linked application without having to change the runtime-shared-library-path option, which can be verbose, or edit the configuration files. For more information about RSLs, see Using Runtime Shared Libraries. |
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 true. For more information about viewing warnings and errors, see Viewing warnings and errors. |
target-player=player_version | Specifies the version of Flash Player that you want to target with the application. Features requiring a later version of Flash Player are not compiled into the application. The player_version parameter has the following format: major_version.minor_version.revisionThe major_version is required while minor_version and revision are optional. The minimum value is 9.0.0. If you do not specify the minor_version or revision, then the compiler uses zero. If you do not explicitly set the value of this option, the compiler uses the default from the flex-config.xml file. The value in flex-config.xml is the version of Flash Player that shipped with the SDK. This option is useful if your application's audience has a specific player and cannot upgrade. You can use this to "downgrade" your application for that audience. This option is commonly used in conjunction with framework RSLs. For more information, see Targeting Flash Player versions. |
theme filename [...] | 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 Adobe Flex 3 Developer Guide. |
title text | 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 true. When the use-network property is set to false, the application can access the local filesystem (for example, use the XML.load() method with file: URLs) but not network services. In most circumstances, the value of this property should be true. For more information about the use-network property, see Applying Flex Security. |
use-resource-bundle-metadata=true|false | Enables resource bundles. Set to true to instruct the compiler to process the contents of the [ResourceBundle] metadata tag. The default value is true. For more information, see Localizing Flex Applications in Adobe Flex 3 Developer 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 debug option to true. The default value is false. |
verify-digests=true|false | Instructs the application to check the digest of the RSL SWF file against the digest that was compiled into the application at compile time. This is a security measure that lets you load RSLs from remote domains or different sub-domains. It also lets you enforce versioning of your RSLs by forcing an application's digest to match the RSL's digest. If the digests are out of sync, you must recompile your application or load a different RSL SWF file. For more information about RSLs, see Using Runtime Shared Libraries. |
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 false to disable all warnings. This option overrides thewarn-warning_type options. The default value is true. |