====== Flex Compiler ====== [[http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=compilers_123_24.html|Source]] ===== Options ===== 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 Flex 2 Developer's 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 advanced This 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. For more information on using the {context.root} token, see Changing the context root. 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 also 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 SWC files generated with the compc compiler, set this value to true, unless the target SWC file is an RSL. In that case, set the debug option 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 to true 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=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 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-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 Flex 2 Developer's Guide. This is an advanced option. 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.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 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 symbol [...] 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 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. 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 path-element 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 flashType property in a style sheet overrides this value. The default value is false. For more information about using FlashType, see Using Fonts in Flex 2 Developer's Guide. fonts.languages.language-range lang 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 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 Flex 2 Developer's Guide. This is an advanced option. fonts.max-cached-fonts string 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 string 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 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, see Command-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. 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 does not support incremental compilation. keep-as3-metadata=class_name [...] Specifies metadata that you want to keep. By default, the compiler keeps the following metadata: * Bindable * Managed * ChangeEvent * NonCommittingChangeEvent * Transient 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. 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 to false, 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. lazy-init=true|false Enables ABC bytecode lazy initialization. The default value is false. This is an advanced option. <