| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <!DOCTYPE html |
| PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html lang="en-us" xml:lang="en-us"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| <meta name="DC.Type" content="topic"/> |
| <meta name="DC.Title" content="Flex compilers"/> |
| <meta name="DC.Format" content="XHTML"/> |
| <meta name="DC.Identifier" content="WS2db454920e96a9e51e63e3d11c0bf69084-7ffd_verapache"/> |
| <link rel="stylesheet" type="text/css" href="commonltr.css"/> |
| <title>Flex compilers</title> |
| </head> |
| <body id="WS2db454920e96a9e51e63e3d11c0bf69084-7ffd_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7ffd_verapache"><!-- --></a> |
| |
| |
| <h1 class="topictitle1">Flex compilers</h1> |
| |
| <div> |
| <p/> |
| |
| </div> |
| |
| <div class="nested1" id="WS2db454920e96a9e51e63e3d11c0bf69084-7ed1_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7ed1_verapache"><!-- --></a> |
| <h2 class="topictitle2">About the Flex compilers</h2> |
| |
| |
| <div> |
| <p> |
| |
| |
| Flex |
| includes the following application and component compilers:</p> |
| |
| <ul> |
| <li> |
| <p>Application compilers. The application compilers create |
| SWF files from MXML, ActionScript, and other assets such as images, |
| SWF files, and SWC files. </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| Component |
| compilers. The component compilers create SWC files from the same |
| kinds of files. The application compilers then use the SWC files |
| as component libraries, themes, or RSLs.</p> |
| |
| </li> |
| |
| </ul> |
| |
| <p>The following example shows the input and output of the Flex |
| compilers:</p> |
| |
| <div class="figborder"> |
| <img src="images/cpl_compiler.png" alt="Input and output of the Flex compilers."/> |
| </div> |
| |
| <p> |
| |
| |
| |
| You open the application |
| compiler with the mxmlc command-line tool. You open the component |
| compiler with the compc command-line tool.</p> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7ffe_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7ffe_verapache"><!-- --></a> |
| <h3 class="topictitle3">About the application compilers</h3> |
| |
| |
| <div> |
| <p> |
| |
| The application compilers create |
| SWF files that are run in an Adobe™ Flash<sup>®</sup> Player client or in an Adobe AIR™ application. The client can be a stand-alone Flash |
| Player or a Flash Player in a browser, which takes the form of an |
| ActiveX control for Microsoft Internet Explorer or a plug-in for |
| Netscape-based browsers.</p> |
| |
| <dl> |
| |
| <dt class="dlterm">The mxmlc command-line compiler</dt> |
| |
| <dd> |
| <p>You open the mxmlc compiler from the command line to create |
| a SWF file that you then deploy to a website. Typically, you pass |
| the name of the application’s root MXML file to the compiler. The |
| output is a SWF file. For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a94_verapache">Using |
| the mxmlc application compiler</a>.</p> |
| |
| </dd> |
| |
| |
| </dl> |
| |
| <p>The mxmlc compiler options are described in <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a92_verapache">About |
| the application compiler options</a>.</p> |
| |
| <p>You can compile applications that are written entirely in ActionScript |
| and contain no MXML using the mxmlc compiler. </p> |
| |
| </div> |
| |
| <div class="nested3" id="WS2db454920e96a9e51e63e3d11c0bf69084-7a94_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7a94_verapache"><!-- --></a> |
| <h4 class="topictitle4">Using the mxmlc application compiler</h4> |
| |
| |
| <div> |
| <p> |
| |
| |
| You |
| use the mxmlc command-line compiler to create SWF files from MXML, |
| AS, and other source files. You can open it as a shell script and |
| executable file for use on Windows and UNIX systems. You use this |
| compiler to precompile applications that you deploy later. </p> |
| |
| <p>The command-line compiler is installed with Flex SDK. It is in |
| the <em>flex_install_dir</em>/bin directory in Flex SDK. </p> |
| |
| <p>To use the mxmlc utility, you should understand its syntax and |
| how to use configuration files. For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f14_verapache">About |
| the command-line compilers</a>.</p> |
| |
| <p> |
| The basic syntax |
| of the mxmlc utility is as follows:</p> |
| |
| <pre class="codeblock"> <em>mxmlc [options] target_file</em> </pre> |
| |
| <p>The default option is the target file to compile into a SWF file, |
| and it is required to have a value. If you use a space-separated |
| list as part of the options, you can terminate the list with a double |
| hyphen before adding the target file; for example:</p> |
| |
| <pre class="codeblock"> mxmlc -option arg1 arg2 arg3 -- target_file.mxml</pre> |
| |
| <p>To see a list of options for mxmlc, you can use the <samp class="codeph">help</samp> |
| <samp class="codeph">list</samp> option, |
| as the following example shows:</p> |
| |
| <pre class="codeblock"> mxmlc -help list</pre> |
| |
| <p>To see a list of all options available for mxmlc, including advanced |
| options, you use the following command:</p> |
| |
| <pre class="codeblock"> mxmlc -help list advanced</pre> |
| |
| <p>The default output of mxmlc is <em>filename</em>.swf, where <em>filename</em> is |
| the name of the root application file. The default output location |
| is in the same directory as the target, unless you specify an output |
| file and location with the <samp class="codeph">output</samp> option.</p> |
| |
| <p>The mxmlc command-line compiler does not generate an HTML wrapper. |
| You must create your own wrapper to deploy a SWF file that the mxmlc |
| compiler produced. The wrapper is used to embed the SWF object in |
| the HTML tag. It includes the <samp class="codeph"><object></samp> and <samp class="codeph"><embed></samp> tags, |
| as well as scripts that support Flash Player version detection and |
| history management. For information about creating an HTML wrapper, |
| see <a href="flx_wrapper_wr.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ecf_verapache">Creating |
| a wrapper</a>.</p> |
| |
| <p>The mxmlc utility uses the default compiler settings in the flex-config.xml |
| file. This file is in the <em>flex_sdk_dir</em>/frameworks/ directory. |
| You can change the settings in this file or use another custom configuration |
| file. For more information on using configuration files, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fca_verapache">About |
| configuration files</a>.</p> |
| |
| <p>The mxmlc compiler is highly customizable with a large set of |
| options. For information on the compiler options, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a92_verapache">About |
| the application compiler options</a>.</p> |
| |
| <p>You can also open the mxmlc compiler with the <samp class="codeph">java</samp> command |
| on the command line. For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a88_verapache">Invoking |
| the command-line compilers with Java</a>.</p> |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7ffb_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7ffb_verapache"><!-- --></a> |
| <h3 class="topictitle3">About the component compiler</h3> |
| |
| |
| <div> |
| <p> |
| |
| |
| |
| You use the component compiler |
| to generate a SWC file from component source files and other asset |
| files such as images and style sheets. A SWC file is an archive of |
| components and other assets. For more information about SWC files, |
| see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd3_verapache">About |
| SWC files</a>.</p> |
| |
| <p>In some ways, the component compiler is similar to the application |
| compiler. The application compiler produces a SWF file from one |
| or more MXML and ActionScript files; the component compiler produces |
| a SWC file from its input files. SWC files are compressed files |
| that contain a SWF file (library.swf), asset files, and a catalog.xml |
| file. </p> |
| |
| <p>You use the component compiler to create the following kinds |
| of assets:</p> |
| |
| <dl> |
| |
| <dt class="dlterm">Component libraries</dt> |
| |
| <dd> |
| <p>Component libraries are SWC files that contain one or more |
| components that are used by applications. SWC files also contain |
| the namespace information that describe the contents of the SWC |
| file. For more information about component libraries, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd3_verapache">About |
| SWC files</a>.</p> |
| |
| </dd> |
| |
| |
| |
| <dt class="dlterm">Runtime shared libraries (RSLs)</dt> |
| |
| <dd> |
| <p>RSLs are external shared assets that can be separately downloaded |
| and cached on the client. These shared assets are loaded by any |
| number of applications at run time. For more information on RSLs, |
| see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd1_verapache">Runtime |
| Shared Libraries</a>.</p> |
| |
| </dd> |
| |
| |
| |
| <dt class="dlterm">Themes</dt> |
| |
| <dd> |
| <p>Themes are a combination of skins and Cascading Style Sheets |
| (CSS). You use themes to define the look and feel of an application |
| built with Flex. For more information on themes, see <a href="flx_styles_st.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fee_verapache">Styles |
| and themes</a>.</p> |
| |
| <p>You use the component compiler in the following |
| ways:</p> |
| |
| </dd> |
| |
| |
| |
| <dt class="dlterm">The compc command-line compiler</dt> |
| |
| <dd> |
| <p>You open the compc compiler from the command line to create |
| a SWC file. For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a82_verapache">Using |
| the compc component compiler</a>.</p> |
| |
| <p>The component compiler |
| has many of the same options as the application compilers, as described |
| in <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a92_verapache">About |
| the application compiler options</a>. The component compiler |
| has additional options as described in <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a80_verapache">About |
| the component compiler options</a>.</p> |
| |
| <p>Like the application |
| compiler, you can use the <samp class="codeph">load-config</samp> option to |
| point the component compiler to a configuration file, rather than |
| specify command-line options or set the options in the Flex Compiler |
| dialog box.</p> |
| |
| <p>When you compile a SWC file, store the new file |
| in a location that is not the same as the source files. If both |
| sets of files are accessible by Flex when you compile your application, |
| unexpected behavior can occur. </p> |
| |
| <p>The SWC files that are produced |
| by the component compilers do not require an HTML wrapper because |
| they are used as themes, RSLs, or component libraries that are input |
| to other compilers to create applications. You never deploy a SWC file |
| that users can request directly.</p> |
| |
| </dd> |
| |
| |
| </dl> |
| |
| </div> |
| |
| <div class="nested3" id="WS2db454920e96a9e51e63e3d11c0bf69084-7a82_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7a82_verapache"><!-- --></a> |
| <h4 class="topictitle4">Using the compc component compiler</h4> |
| |
| |
| <div> |
| <p> |
| You use the |
| compc command-line compiler to compile SWC files from MXML, ActionScript, |
| and other source files such as style sheets, images, and SWF files.</p> |
| |
| <p> |
| |
| You |
| can open the compc compiler as a shell script and executable file |
| for use on Windows and UNIX systems. It is in the <em>flex_install_dir</em>/bin |
| directory in Flex SDK</p> |
| |
| <p>To use the compc compiler, you should understand how to pass |
| options and use configuration files. For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f14_verapache">About |
| the command-line compilers</a>.</p> |
| |
| <p>The syntax of the compc compiler is as follows:</p> |
| |
| <pre class="codeblock"> compc [options] -include-classes class [...]</pre> |
| |
| <p>The default option for compc is <samp class="codeph">include-classes</samp>. |
| At least one of the “include-” options is required.</p> |
| |
| <p>To see a list of supported options for compc, you can use the <samp class="codeph">help</samp> |
| <samp class="codeph">list</samp> option, as |
| the following example shows:</p> |
| |
| <pre class="codeblock"> compc -help list</pre> |
| |
| <p>The compc compiler uses the default compiler settings in the |
| flex-config.xml file. Like the application compiler, you can change |
| these settings or use another custom configuration file. Unlike |
| the application compiler, however, the component compiler does not |
| support the use of default configuration files.</p> |
| |
| <p>You can also open the compc compiler with the <samp class="codeph">java</samp> command |
| on the command line. For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a88_verapache">Invoking |
| the command-line compilers with Java</a>.</p> |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested1" id="WS2db454920e96a9e51e63e3d11c0bf69084-7f14_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7f14_verapache"><!-- --></a> |
| <h2 class="topictitle2">About the command-line compilers</h2> |
| |
| |
| <div> |
| <p> |
| You |
| use the mxmlc and compc command-line compilers to compile your MXML and |
| AS files into SWF and SWC files. You can use the utilities to precompile |
| applications that you want to deploy on another server or to automate |
| compilation in a testing environment.</p> |
| |
| <p>To use the command-line compilers, you must have a Java run-time |
| environment in your system path. </p> |
| |
| <p>For Flex SDK, the command-line compilers are located in the <em>flex_install_dir</em>/bin directory. </p> |
| |
| <p>When using mxmlc and compc on the command line, you can also |
| use a configuration file to store your options rather than list |
| them on the command line. You can store command-line options as |
| XML blocks in a configuration file. For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fca_verapache">About |
| configuration files</a>.</p> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7ab6_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7ab6_verapache"><!-- --></a> |
| <h3 class="topictitle3">Command-line syntax</h3> |
| |
| |
| <div> |
| <p> |
| |
| The |
| mxmlc and compc compilers take many options. The options are listed |
| in the help which you can view with the <samp class="codeph">help</samp> option, |
| as the following example shows:</p> |
| |
| <pre class="codeblock"> mxmlc -help</pre> |
| |
| <p>This displays a menu of choices for getting help. The most common |
| choice is to list the basic configuration options:</p> |
| |
| <pre class="codeblock"> mxmlc -help list</pre> |
| |
| <p>To see advanced options, use the <samp class="codeph">list advanced</samp> option, |
| as the following example shows:</p> |
| |
| <pre class="codeblock"> mxmlc -help list advanced</pre> |
| |
| <p>To see a list of entries whose names or descriptions include |
| a particular String, use the following syntax:</p> |
| |
| <pre class="codeblock"> <em>mxmlc -help pattern</em> </pre> |
| |
| <p>The following example returns descriptions for the <samp class="codeph">external-library-path</samp>, <samp class="codeph">library-path</samp>, |
| and <samp class="codeph">runtime-shared-libraries</samp> options:</p> |
| |
| <pre class="codeblock"> mxmlc -help list library</pre> |
| |
| <p>For a complete description of mxmlc options, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a92_verapache">About |
| the application compiler options</a>. For a complete description |
| of compc options, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a80_verapache">About |
| the component compiler options</a>.</p> |
| |
| <p>Many command-line options, such as <samp class="codeph">show-actionscript-warnings</samp> and <samp class="codeph">accessible</samp>, |
| have <samp class="codeph">true</samp> and <samp class="codeph">false</samp> values. You |
| specify these values by using the following syntax:</p> |
| |
| <pre class="codeblock"> mxmlc -accessible=true -show-actionscript-warnings=true</pre> |
| |
| <p>Some options, such as <samp class="codeph">source-path</samp>, take a list |
| of one or more options. You can see which options take a list by |
| examining the help output. Square brackets (<samp class="codeph">[ ]</samp>) that |
| surround options indicate that the option can take a list of one |
| or more parameters. </p> |
| |
| <p>You can separate each entry in a list with a space or a comma. |
| The syntax is as follows:</p> |
| |
| <pre class="codeblock"> -var val1 val2</pre> |
| |
| <p>or</p> |
| |
| <pre class="codeblock"> -var=val1, val2</pre> |
| |
| <p>If you do not use commas to separate entries, you terminate a |
| list by using a double hyphen, as the following example shows:</p> |
| |
| <pre class="codeblock"> <em>-var val1 val2 -- -next_option</em> </pre> |
| |
| <p>If you use commas to separate entries, you terminate a list by |
| not using a comma after the last entry, as the following example |
| shows:</p> |
| |
| <pre class="codeblock"> <em>-var=val1, val2 -next_option</em> </pre> |
| |
| <p> |
| You can append |
| values to an option using the += operator. This adds the new entry |
| to the end of the list of existing entries rather than replacing |
| the existing entries. The following example adds the c:/myfiles |
| directory to the <samp class="codeph">library-path</samp> option:</p> |
| |
| <pre class="codeblock"> mxmlc -library-path+=c:/myfiles</pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7ff6_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7ff6_verapache"><!-- --></a> |
| <h3 class="topictitle3">Using abbreviated option names</h3> |
| |
| |
| <div> |
| <p>In some cases, the command-line help shows an option with |
| dot-notation syntax; for example, <samp class="codeph">source-path</samp> is |
| shown as <samp class="codeph">compiler.source-path</samp>. This notation indicates |
| how you would set this option in a configuration file. On the command |
| line, you can specify the option with only the final node, <samp class="codeph">source-path</samp>, |
| as long as that node is unique, as the following example shows:</p> |
| |
| <pre class="codeblock"> mxmlc -source-path . c:/myclasses/ -- foo.mxml</pre> |
| |
| <p>For more information about using configuration files to store |
| command-line options, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fca_verapache">About |
| configuration files</a>.</p> |
| |
| <p>Some compiler options have aliases. <em>Aliases</em> provide shortened |
| variations of the option name to make command lines more readable |
| and less verbose. For example, the alias for the <samp class="codeph">output</samp> option |
| is <samp class="codeph">o</samp>. You can view a list of options by their aliases |
| by using the following command:</p> |
| |
| <pre class="codeblock"> mxmlc -help list aliases</pre> |
| |
| <p>or</p> |
| |
| <pre class="codeblock"> mxmlc -help list advanced aliases</pre> |
| |
| <p>You can also see the aliases in the verbose help output by using |
| the following command:</p> |
| |
| <pre class="codeblock"> mxmlc -help list details</pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7a88_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7a88_verapache"><!-- --></a> |
| <h3 class="topictitle3">Invoking the command-line compilers |
| with Java</h3> |
| |
| |
| <div> |
| <p> |
| |
| Flex provides a simple interface to the |
| command-line compilers. For UNIX users, there is a shell script. |
| For Windows users, there is an executable file. These files are located |
| in the bin directory. You can also invoke the compilers using Java. |
| This lets you integrate the compilers into Java-based projects (such |
| as Ant) or other utilities. </p> |
| |
| <p>The shell scripts and executable files for the command-line compilers |
| wrap calls to the mxmlc.jar and compc.jar JAR files. To invoke the |
| compilers from Java, you call the JAR files directly. For Flex SDK, |
| the JAR files are located in the <em>flex_install_dir</em>/lib directory. </p> |
| |
| <p>To invoke a command in a JAR file, use the <samp class="codeph">java</samp> command |
| from the command line and specify the JAR file you want to execute |
| with the <samp class="codeph">jar</samp> option. You must also specify the |
| value of the <samp class="codeph">+flexlib</samp> option. This advanced option |
| lets you set the root directory that is used by the compiler to |
| locate the flex-config.xml file, among other files. You typically |
| point it to your frameworks directory. From there, the compiler |
| can detect the location of other configuration files.</p> |
| |
| <p>The following example compiles MyApp.mxml into a SWF file using |
| the JAR file to invoke the mxmlc compiler:</p> |
| |
| <pre class="codeblock"> java -jar ../lib/mxmlc.jar +flexlib c:/flex_4_sdk/frameworks c:/flex/MyApp.mxml</pre> |
| |
| <p>You pass all other options as you would when you open the command-line compilers. |
| The following example sets the locale and source path when compiling |
| MyApp:</p> |
| |
| <pre class="codeblock"> java -jar ../lib/mxmlc.jar +flexlib c:/flex_4_sdk/frameworks -locale en_US -source-path locale/{locale} c:/flex/MyApp.mxml</pre> |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested1" id="WS2db454920e96a9e51e63e3d11c0bf69084-7fca_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7fca_verapache"><!-- --></a> |
| <h2 class="topictitle2">About configuration files</h2> |
| |
| |
| <div> |
| <p> |
| Configuration |
| files can be used by the command-line utilities.</p> |
| |
| <p>Flex includes a default configuration file named flex-config.xml. |
| This configuration file contains most of the default compiler settings |
| for the application and component compilers. You can customize this |
| file or create your own custom configuration file.</p> |
| |
| <p>Flex SDK includes the flex-config.xml file in the <em>flex_install_dir</em>/frameworks directory. </p> |
| |
| <p>You can generate a configuration file with the current settings |
| by using the <samp class="codeph">dump-config</samp> option, as the following |
| example shows:</p> |
| |
| <pre class="codeblock"> mxmlc -dump-config myapp-config.xml</pre> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7a76_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7a76_verapache"><!-- --></a> |
| <h3 class="topictitle3">Locating configuration files</h3> |
| |
| |
| <div> |
| <p>You can specify the location of a configuration file by |
| using the <samp class="codeph">load-config</samp> option. The target configuration |
| file can be the default flex-config.xml file, or it can be a custom |
| configuration file. The following example loads a custom configuration |
| file:</p> |
| |
| <pre class="codeblock"> compc -load-config=myconfig.xml</pre> |
| |
| <p>If you specify the filename with the <samp class="codeph">+=</samp> operator, |
| your loaded configuration file is used <em>in addition to</em> and |
| not instead of the flex-config.xml file:</p> |
| |
| <pre class="codeblock"> compc -load-config+=myconfig.xml</pre> |
| |
| <p>With the mxmlc compiler, you can also use a local configuration |
| file. A <em>local configuration file</em> does not require you to |
| point to it on the command line. Rather, Flex examines the same |
| directory as the target MXML file for a configuration file with |
| the same name (one that matches the <em>filename</em>-config.xml filename). |
| If it finds a file, it uses it in conjunction with the flex-config.xml |
| file. You can also specify a configuration file by using the <samp class="codeph">load-config</samp> option |
| with the <samp class="codeph">+=</samp> operator.</p> |
| |
| <p>For example, if your application’s top-level file is called MyApp.mxml, |
| the compiler first checks for a MyApp-config.xml file for configuration |
| settings. With this feature, you can easily compile multiple applications |
| using different configuration options without changing your command-line |
| options or your flex-config.xml file.</p> |
| |
| <p>Options in the local configuration file take precedence over |
| options set in the flex-config.xml file. Options set in a configuration |
| file that the <samp class="codeph">load-config</samp> option specify take precedence |
| over the local configuration file. Command-line settings take precedence |
| over all configuration file settings. For more information on the |
| precedence of compiler options, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a77_verapache">About |
| option precedence</a>.</p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7ff2_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7ff2_verapache"><!-- --></a> |
| <h3 class="topictitle3">Configuration file syntax</h3> |
| |
| |
| <div> |
| <p> |
| You |
| store values in a configuration file in XML blocks, which follow |
| a specific syntax. In general, the tags you use match the command-line |
| options.</p> |
| |
| </div> |
| |
| <div class="nested3" id="WS2db454920e96a9e51e63e3d11c0bf67670-7ff1_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7ff1_verapache"><!-- --></a> |
| <h4 class="topictitle4">About the root tag</h4> |
| |
| |
| <div> |
| <p>The root tag of the default configuration file, flex-config.xml, |
| is <samp class="codeph"><flex-config></samp>. If you write a custom configuration |
| file, it must also have this root tag. Compiler configuration files |
| must also have an XML declaration tag, as the following example |
| shows:</p> |
| |
| <pre class="codeblock"> <?xml version="1.0"?> |
| <flex-config></pre> |
| |
| <p>You must close the <samp class="codeph"><flex-config></samp> tag as |
| you would any other XML tag. All compiler configuration files must |
| be closed with the following tag:</p> |
| |
| <pre class="codeblock"> </flex-config></pre> |
| |
| <p>In general, the second tag in a configuration file is the <samp class="codeph"><compiler></samp> tag. |
| This tag wraps most compiler options. However, not all compiler |
| options are set in the <samp class="codeph"><compiler></samp> block of |
| the configuration file. </p> |
| |
| <p>Tags that you must wrap in the compiler block are prefixed by <samp class="codeph">compiler</samp> in |
| the help output (for example, <samp class="codeph">compiler.services</samp>). |
| If the option uses no dot-notation in the help output (for example, <samp class="codeph">include-file</samp>), |
| it is a tag at the root level of the configuration file, and the |
| entry appears as follows:</p> |
| |
| <pre class="codeblock"> <compiler> |
| ... |
| </compiler> |
| <include-file> |
| <name>logo.gif</name> |
| <path>c:/images/logo/logo1.gif</path> |
| </include-file></pre> |
| |
| <p>In some cases, options have multiple parent tags, as with the |
| fonts options, such as <samp class="codeph">compiler.fonts.managers</samp> and <samp class="codeph">compiler.fonts.languages.language</samp>. |
| Other options that require parent tags when added to a configuration |
| file include the <samp class="codeph">frames.frame</samp> option and the metadata |
| options. The following sections describe methods for determining |
| the syntax.</p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested3" id="WS2db454920e96a9e51e63e3d11c0bf67670-7ff0_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7ff0_verapache"><!-- --></a> |
| <h4 class="topictitle4">Getting the configuration file |
| tags</h4> |
| |
| |
| <div> |
| <p>Use the <samp class="codeph">help list</samp> option of the command-line |
| compilers to get the configuration file syntax of the compiler options; |
| for example:</p> |
| |
| <pre class="codeblock"> mxmlc -help list advanced</pre> |
| |
| <p>The following is the entry for the <samp class="codeph">source-path</samp> option: </p> |
| |
| <pre class="codeblock"> -compiler.source-path [path-element][...]</pre> |
| |
| <p>This indicates that in the configuration file, you can have one |
| or more <samp class="codeph"><path-element></samp> child tags of the <samp class="codeph"><source-path></samp> tag, |
| and that <samp class="codeph"><source-path></samp> is a child of the <samp class="codeph"><compiler></samp> tag. |
| The following example shows how this should appear in the configuration |
| file:</p> |
| |
| <pre class="codeblock"> <compiler> |
| <source-path> |
| <path-element>.</path-element> |
| <path-element>c:/myclasses/</path-element> |
| </source-path> |
| </compiler></pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested3" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fef_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fef_verapache"><!-- --></a> |
| <h4 class="topictitle4">Understanding leaf nodes</h4> |
| |
| |
| <div> |
| <p> |
| The |
| help output uses dot-notation to separate child tags from parent |
| tags, with the right-most entry being known as the <em>leaf node</em>. |
| For example, <samp class="codeph">-tag1.tag2</samp> indicates that <samp class="codeph"><tag2></samp> should |
| be a child tag of <samp class="codeph"><tag1></samp>. </p> |
| |
| <p>Angle brackets (<samp class="codeph">< ></samp>) or square brackets |
| (<samp class="codeph">[ ]</samp>) that surround an option indicate that the |
| option is a leaf node. </p> |
| |
| <p>Square brackets indicate that there can be a list of one or more |
| parameters for that option.</p> |
| |
| <p>If the leaf node of a tag in the angle bracket is unique, you |
| do not have to specify the parent tags in the configuration file. |
| For example, the help usage shows the following:</p> |
| |
| <pre class="codeblock"> compiler.fonts.managers [manager-class][...]</pre> |
| |
| <p>You can specify the value of this option in the configuration |
| file, as the following example shows:</p> |
| |
| <pre class="codeblock"> <compiler> |
| <fonts> |
| <managers> |
| <manager-class>flash.fonts.JREFontManager</manager-class> |
| </managers> |
| </fonts> |
| </compiler></pre> |
| |
| <p>However, the <samp class="codeph"><manager-class></samp> leaf node |
| is unique, so you can set the value without specifying the <samp class="codeph"><fonts></samp> and <samp class="codeph"><managers></samp> parent |
| tags, as the following example shows:</p> |
| |
| <pre class="codeblock"> <compiler> |
| <manager-class>flash.fonts.JREFontManager</manager-class> |
| </compiler></pre> |
| |
| <p>If the help output shows multiple options listed in angle brackets, |
| you set the values of these options at the same level inside the |
| configuration file and do not make them child tags of each other. |
| For example, the usage for default-size (<samp class="codeph">default-size <width> <height></samp>) |
| indicates that the default size of the application is set in a configuration |
| file, as the following example shows:</p> |
| |
| <pre class="codeblock"> <default-size> |
| <height>height_value</height> |
| <width>width_value</width> |
| </default-size></pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested3" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fee_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fee_verapache"><!-- --></a> |
| <h4 class="topictitle4">Using tokens</h4> |
| |
| |
| <div> |
| <p>You can pass custom token values to the compiler using |
| the following syntax:</p> |
| |
| <pre class="codeblock"> +<em>token_name</em>=<em>value</em> </pre> |
| |
| <p>In the configuration file, you reference that value using the |
| following syntax:</p> |
| |
| <pre class="codeblock"> ${<em>token_name</em>}</pre> |
| |
| <p> |
| |
| |
| You |
| can use the <samp class="codeph">@Context</samp> token in your configuration |
| files to represent the context root of the application. You can |
| also use the <samp class="codeph">${flexlib}</samp> token to represent the |
| frameworks directory. This is useful if you set up your own configuration |
| and are not using the default <samp class="codeph">library-path</samp> settings.</p> |
| |
| <p>The default value of the <samp class="codeph">${flexlib}</samp> token is <samp class="codeph"> |
| <em>application_home</em> |
| </samp> |
| <samp class="codeph">\frameworks</samp>.</p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested3" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fed_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fed_verapache"><!-- --></a> |
| <h4 class="topictitle4">Appending values</h4> |
| |
| |
| <div> |
| <p>In a configuration file, you can specify the <samp class="codeph">append</samp> attribute |
| of any tag that takes a list of arguments. Set this attribute to <samp class="codeph">true</samp> to |
| indicate that the values should be appended to the option rather |
| than replace it. The default value is <samp class="codeph">false</samp>.</p> |
| |
| <p>Setting the <samp class="codeph">append</samp> attribute to <samp class="codeph">true</samp> lets |
| you compound the values of options with multiple configuration files. |
| The following example appends two entries to the <samp class="codeph">library-path</samp> option:</p> |
| |
| <pre class="codeblock"> <library-path append="true"> |
| <path-element>/mylibs</path-element> |
| <path-element>/myotherlibs</path-element> |
| </library-path></pre> |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested1" id="WS2db454920e96a9e51e63e3d11c0bf69084-7a77_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7a77_verapache"><!-- --></a> |
| <h2 class="topictitle2">About option precedence</h2> |
| |
| |
| <div> |
| <p> |
| You |
| can set the same options in multiple places and the Flex compilers |
| use the value from the source that has the highest precedence. </p> |
| |
| <p>If you do not specify an option on the command line, the compilers |
| check for a <samp class="codeph">load-config</samp> option and get the value |
| from that file.</p> |
| |
| <p>When using the mxmlc compiler, Flex checks to see if there is |
| an <em>app</em>_<em>name</em>-config.xml file in the same directory |
| as the target MXML file. This is known as the local configuration |
| file and is described in <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a76_verapache">Locating |
| configuration files</a>. The syntax and structure of local configuration |
| files are the same as with the flex-config.xml file.</p> |
| |
| <p>If no <samp class="codeph">load-config</samp> option is specified, the compilers |
| check for the flex-config.xml file. The compilers look for the flex-config.xml |
| file in the /frameworks directory. The following location is the |
| default:</p> |
| |
| <pre class="codeblock"> {flex_root}/frameworks</pre> |
| |
| <p>Most options have a default value that the compilers use if the |
| option is not set in any of the other ways.</p> |
| |
| <p>The following table shows the possible sources of options for |
| each compiler. The table also shows the order of precedence for |
| each option. The options set using the method described in a lower |
| row take precedence over the options set using the methods described |
| in a higher row.</p> |
| |
| |
| <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"> |
| |
| |
| |
| <thead align="left"> |
| <tr> |
| <th class="cellrowborder" valign="top" width="NaN%" id="d107933e1292"> |
| <p>Compiler options</p> |
| |
| </th> |
| |
| <th class="cellrowborder" valign="top" width="NaN%" id="d107933e1298"> |
| <p>mxmlc</p> |
| |
| </th> |
| |
| <th class="cellrowborder" valign="top" width="NaN%" id="d107933e1304"> |
| <p>compc</p> |
| |
| </th> |
| |
| </tr> |
| |
| </thead> |
| |
| <tbody> |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1292 "> |
| <p>Default settings</p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1298 "> |
| <p>No</p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1304 "> |
| <p>No</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1292 "> |
| <p>flex-config.xml</p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1298 "> |
| <p>Yes</p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1304 "> |
| <p>Yes</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1292 "> |
| <p>Local configuration file</p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1298 "> |
| <p>Yes</p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1304 "> |
| <p>No</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1292 "> |
| <p>Configuration file specified by load-config |
| option</p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1298 "> |
| <p>Yes</p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1304 "> |
| <p>Yes</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1292 "> |
| <p>Command-line option</p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1298 "> |
| <p>Yes</p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1304 "> |
| <p>Yes</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1292 "> |
| <p>Options panel</p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1298 "> |
| <p>No</p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1304 "> |
| <p>No</p> |
| |
| </td> |
| |
| </tr> |
| |
| </tbody> |
| |
| </table> |
| </div> |
| |
| <p>You can mix and match the source of the compiler options. For |
| example, you can specify a custom configuration file with the <samp class="codeph">load-config</samp> option, |
| and also set additional options on the command line. </p> |
| |
| <p>You can also use multiple configuration files. You can chain |
| them by using the <samp class="codeph">+=</samp> operator with the <samp class="codeph">load-config</samp> option. |
| If you specify a configuration file with this option, the compilers |
| also look for the flex-config.xml and local (<em>appname</em>-config.xml) |
| configuration files.</p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested1" id="WS2db454920e96a9e51e63e3d11c0bf69084-7fcc_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7fcc_verapache"><!-- --></a> |
| <h2 class="topictitle2">Using mxmlc, the application compiler</h2> |
| |
| |
| <div> |
| <p>You use the application compiler to compile SWF files from |
| your ActionScript and MXML source files.</p> |
| |
| <p> |
| The |
| application compiler’s options let you define settings such as the |
| library path and whether to include debug information in the resulting |
| SWF file. Also, you can set application-specific settings such as |
| the frame rate at which the SWF file should play and its height |
| and width. </p> |
| |
| <p>To invoke the application compiler with Flex SDK, you use the |
| mxmlc command-line utility. </p> |
| |
| <p>The following set of examples use the application compiler.</p> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7a92_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7a92_verapache"><!-- --></a> |
| <h3 class="topictitle3">About the application compiler |
| options</h3> |
| |
| |
| <div> |
| <p> |
| |
| |
| |
| The |
| following table describes the application compiler options. You |
| invoke the application compiler with the mxmlc command-line utility.</p> |
| |
| |
| <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"> |
| |
| |
| <thead align="left"> |
| <tr> |
| <th class="cellrowborder" valign="top" width="NaN%" id="d107933e1531"> |
| <p>Option</p> |
| |
| </th> |
| |
| <th class="cellrowborder" valign="top" width="NaN%" id="d107933e1537"> |
| <p>Description</p> |
| |
| </th> |
| |
| </tr> |
| |
| </thead> |
| |
| <tbody> |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">accessible=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Enables accessibility features when compiling |
| the application or SWC file. The default value is <samp class="codeph">false</samp>.</p> |
| |
| <p> |
| For more information on using the Flex accessibility |
| features, see <a href="flx_accessible_ac.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f60_verapache">Accessible applications </a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">actionscript-file-encoding <em>string</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets the file encoding for ActionScript |
| files.</p> |
| |
| <p> |
| |
| For |
| more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ac4_verapache">Setting |
| the file encoding</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">advanced</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Lists advanced help options when used with |
| the help option, as the following example shows:</p> |
| |
| <div class="p"> |
| <pre class="codeblock">mxmlc -help advanced</pre> |
| |
| </div> |
| |
| <p> |
| This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">allow-source-path-overlap=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Checks if a <samp class="codeph">source-path</samp> entry |
| is a subdirectory of another <samp class="codeph">source-path</samp> entry. |
| It helps make the package names of MXML components unambiguous.</p> |
| |
| <p> |
| This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">as3=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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.</p> |
| |
| <p>The default value is <samp class="codeph">true</samp>. |
| If you set this value to <samp class="codeph">false</samp>, you must set the <samp class="codeph">es</samp> option |
| to <samp class="codeph">true</samp>.</p> |
| |
| <p>This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">benchmark=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p> |
| |
| |
| Prints |
| detailed compile times to the standard output. The default value |
| is <samp class="codeph">true</samp>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">compress=true|false</samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Enables or disables SWF file compression.</p> |
| |
| <p>The |
| default value is <samp class="codeph">true</samp> when debugging is disabled |
| (so that release SWF files are compressed) and <samp class="codeph">false</samp> when |
| debugging is enabled (so that debug SWF files are not compressed).</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">context-root <em>context-path</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets the value of the <samp class="codeph">{context.root}</samp> 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.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">contributor <em>name</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p> |
| Sets |
| metadata in the resulting SWF file. For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ac3_verapache">Adding metadata |
| to SWF files</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">creator <em>name</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets metadata in the resulting SWF file. |
| For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ac3_verapache">Adding metadata |
| to SWF files</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">date <em>text</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets metadata in the resulting SWF file. |
| For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ac3_verapache">Adding metadata |
| to SWF files</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">debug=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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. Enabling |
| the <samp class="codeph">debug</samp> option generates larger SWF files and |
| also disables compilation optimization.</p> |
| |
| <p>For the mxmlc compiler, |
| the default value is <samp class="codeph">false</samp>. For the compc compiler, the |
| default value is <samp class="codeph">true</samp>.</p> |
| |
| <p>When generating SWC |
| files, if <samp class="codeph">debug</samp> is set to <samp class="codeph">true</samp>, |
| 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 <samp class="codeph">false</samp>. </p> |
| |
| <p>For information about the command-line |
| debugger, see <a href="flx_debugging_de.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ffb_verapache">Command-line debugger</a>.</p> |
| |
| <p> |
| |
| |
| If you set this option to <samp class="codeph">true</samp>, |
| Flex also sets the <samp class="codeph">verbose-stacktraces</samp> option to <samp class="codeph">true</samp> |
| </p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">debug-password <em>string</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Lets you engage in remote debugging sessions |
| with the Flash IDE. </p> |
| |
| <p>This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">default-frame-rate <em>int</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets the application’s frame rate. The default |
| value is 24.</p> |
| |
| <p> |
| |
| This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">default-script-limits <em>max-recursion-depth </em><em>max-execution-time</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Defines the application’s script execution |
| limits.</p> |
| |
| <p>The <samp class="codeph">max-recursion-depth</samp> 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.</p> |
| |
| <p>The <samp class="codeph">max-execution-time</samp> 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.</p> |
| |
| <p>You can override these settings |
| in the application.</p> |
| |
| <p> |
| This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">default-size <em>width height</em> </pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Defines the default application size, in |
| pixels. </p> |
| |
| <p>This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">defaults-css-files <em>filename</em> [, ...]</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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. </p> |
| |
| <p>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.</p> |
| |
| <p>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. </p> |
| |
| <p>This option takes one or more files. |
| The precedence for multiple CSS files included with this option |
| is from first to last.</p> |
| |
| <p>This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">defaults-css-url <em>string</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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.</p> |
| |
| <p>For more information |
| on the defaults.css file, see <a href="flx_styles_st.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fee_verapache">Styles |
| and themes</a>.</p> |
| |
| <p> |
| |
| |
| This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock"><samp class="codeph">define=</samp><em>NAMESPACE::variable,value</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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.</p> |
| |
| <p>The following |
| example defines the constant <samp class="codeph">debugging</samp> in the <samp class="codeph">CONFIG</samp> namespace:</p> |
| |
| <div class="p"> |
| <pre class="codeblock">-define=CONFIG::debugging,true</pre> |
| |
| </div> |
| |
| <p>In |
| ActionScript, you can use this value to conditionalize statements; |
| for example:</p> |
| |
| <div class="p"> |
| <pre class="codeblock">CONFIG::debugging {// Execute debugging code here.}</pre> |
| |
| </div> |
| |
| <p>To |
| set multiple conditionals on the command-line, use the <samp class="codeph">define</samp> option more |
| than once.</p> |
| |
| <p>For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7abd_verapache">Using |
| conditional compilation</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">description <em>text</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets metadata in the resulting SWF file. |
| For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ac3_verapache">Adding metadata |
| to SWF files</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">dump-config <em>filename</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Outputs the compiler options in the flex-config.xml |
| file to the target path; for example:</p> |
| |
| <div class="p"> |
| <pre class="codeblock">mxmlc -dump-config myapp-config.xml</pre> |
| |
| </div> |
| |
| <p> |
| |
| This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">es=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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.</p> |
| |
| <p>The |
| default value is <samp class="codeph">false</samp>. </p> |
| |
| <p>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 <samp class="codeph">es</samp> compiler option to <samp class="codeph">true</samp>, |
| you must set the <samp class="codeph">strict</samp> compiler option to <samp class="codeph">false</samp>. |
| Otherwise, the compiler will throw errors.</p> |
| |
| <p>If you set this |
| option to <samp class="codeph">true</samp>, you must also set the value of |
| the <samp class="codeph">as3</samp> compiler option to <samp class="codeph">false</samp>.</p> |
| |
| <p>This |
| is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">externs <em>class_name [...]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets a list of classes to exclude from linking |
| when compiling a SWF file. </p> |
| |
| <p>This option provides compile-time |
| link checking for external references that are dynamically linked.</p> |
| |
| <p>For |
| more information about dynamic linking, see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f1e_verapache">About |
| linking</a>.</p> |
| |
| <p> |
| |
| This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">external-library-path <em>path-element [...]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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.</p> |
| |
| <p>By default, the libs/player/playerglobal.swc file |
| is linked as an external library. This library is built into Flash |
| Player.</p> |
| |
| <p>For more information about dynamic linking, see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f1e_verapache">About |
| linking</a>.</p> |
| |
| <p>You can use the += operator to append the |
| new SWC file to the list of external libraries.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">fonts.advanced-anti-aliasing=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets the default value that determines whether |
| embedded fonts use advanced anti-aliasing information when rendering |
| the font.</p> |
| |
| <p>Setting the value of the <samp class="codeph">advanced-anti-aliasing</samp> property |
| in a style sheet overrides this value.</p> |
| |
| <p>The default value is <samp class="codeph">false</samp>.</p> |
| |
| <p>For |
| more information about using advanced anti-aliasing, see <a href="flx_fonts_ft.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f9e_verapache">Fonts</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">fonts.languages.language-range <em>lang range</em> </pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Specifies the range of Unicode settings |
| for that language. For more information, see <a href="flx_fonts_ft.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f9e_verapache">Fonts</a>.</p> |
| |
| <p>This |
| is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">fonts.local-fonts-snapshot <em>path_to_file</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets the location of the local font snapshot |
| file. The file contains system font data.</p> |
| |
| <p>This is an advanced |
| option. </p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">fonts.managers <em>manager-class [...]</em> </pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Defines the font manager. The default is |
| flash.fonts.JREFontManager. You can also use the flash.fonts.BatikFontManager. |
| For more information, see <a href="flx_fonts_ft.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f9e_verapache">Fonts</a>.</p> |
| |
| <p>This |
| is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">fonts.max-cached-fonts <em>string</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets the maximum number of fonts to keep |
| in the server cache.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">fonts.max-glyphs-per-face <em>string</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets the maximum number of character glyph-outlines |
| to keep in the server cache for each font face.</p> |
| |
| <p>This is an |
| advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">frames.frame=<em>label,class_name</em>[,...]</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <div class="p">Specifies a SWF file frame label with a |
| sequence of class names that are linked onto the frame; for example:<pre class="codeblock">-frame=MyLabel,Class1,Class2</pre> |
| |
| </div> |
| |
| <p>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.</p> |
| |
| <p>This |
| is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">generate-frame-loader=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Toggles the generation of an IFlexBootstrap-derived |
| loader class. </p> |
| |
| <p>This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">headless-server=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Enables the headless implementation of the |
| Flex compiler. This sets the following:</p> |
| |
| <div class="p"> |
| <pre class="codeblock">System.setProperty("java.awt.headless", "true")</pre> |
| |
| </div> |
| |
| <p>The |
| headless setting (java.awt.headless=true) is required to use fonts |
| and SVG on UNIX systems without X Windows.</p> |
| |
| <p> |
| This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">help [-list [advanced]]</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <div class="p">Prints usage information to the standard |
| output. For example:<pre class="codeblock">help -list advanced</pre> |
| |
| </div> |
| |
| <p>For |
| more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ab6_verapache">Command-line |
| syntax</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">include-inheritance-dependencies-only=false|true</samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Include only classes that are inheritance |
| dependencies of classes that are included with the <samp class="codeph">include-classes</samp> compiler |
| option.</p> |
| |
| <p>The default value is <samp class="codeph">false</samp>.</p> |
| |
| <div class="p">This |
| is an advanced option. You might use this compiler option if you |
| are creating a custom RSL and want to externalize as many classes |
| as possible. For example:<pre class="codeblock">compc -include-classes mx.collections.ListCollectionView |
| -include-inheritance-dependencies-only=true |
| -source-path . -output lcv2 -directory</pre> |
| |
| </div> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">include-libraries <em>library</em> [...]</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Links all classes inside a SWC file to the |
| resulting application SWF file, regardless of whether or not they |
| are used.</p> |
| |
| <p>Contrast this option with the <samp class="codeph">library-path</samp> option |
| that includes only those classes that are referenced at compile |
| time.</p> |
| |
| <p>To link one or more classes whether or not they are |
| used and not an entire SWC file, use the <samp class="codeph">includes</samp> option.</p> |
| |
| <p> |
| |
| |
| This option is commonly used to specify resource |
| bundles.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">include-resource-bundles <em>bundle [...]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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 <samp class="codeph">source-path</samp> compiler |
| option. </p> |
| |
| <p> |
| |
| For more information on using |
| resource bundles, see <a href="flx_resourcebundles_rb.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fcf_verapache">Resource |
| Bundles</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">includes <em>class</em> [...]</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Links one or more classes to the resulting |
| application SWF file, whether or not those classes are required |
| at compile time.</p> |
| |
| <p> |
| |
| |
| To |
| link an entire SWC file rather than individual classes, use the <samp class="codeph">include-libraries</samp> option. </p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">incremental=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Enables incremental compilation. For more |
| information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ed3_verapache">About |
| incremental compilation</a>. </p> |
| |
| <p> |
| For the command-line |
| compiler, the default is <samp class="codeph">false</samp>. </p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">isolate-styles=true|false</samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Enables per-module styling.</p> |
| |
| <p>The default |
| value is <samp class="codeph">true</samp>.</p> |
| |
| <p>This is an advanced option. |
| You typically only use this option if you want to set styles in |
| a module that is loaded into your main application. For more information |
| about modules, see <a href="flx_modular_md.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f22_verapache">Modular |
| applications</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">keep-as3-metadata=<em>class_name</em> [...]</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Specifies custom metadata that you want |
| to keep. By default, the compiler keeps the following metadata:</p> |
| |
| <div class="p"> |
| <ul> |
| <li> |
| <p>Bindable</p> |
| |
| </li> |
| |
| <li> |
| <p>Managed</p> |
| |
| </li> |
| |
| <li> |
| <p>ChangeEvent</p> |
| |
| </li> |
| |
| <li> |
| <p>NonCommittingChangeEvent</p> |
| |
| </li> |
| |
| <li> |
| <p>Transient</p> |
| |
| </li> |
| |
| </ul> |
| |
| </div> |
| |
| <p>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.</p> |
| |
| <p>This is an advanced option. For more information, |
| see <a href="flx_metadata_me.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ab2_verapache">About |
| metadata tags</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">keep-all-type-selectors=true|false</samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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 <samp class="codeph">true</samp> 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 <samp class="codeph">false</samp>, 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.</p> |
| |
| <p>This |
| is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">keep-generated-actionscript=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Determines whether to keep the generated |
| ActionScript class files. </p> |
| |
| <p>The generated class files include |
| stubs and classes that are generated by the compiler and used to |
| build the SWF file.</p> |
| |
| <p>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.</p> |
| |
| <p>The default names of the primary |
| generated class files are filename-generated.as and filename-interface.as.</p> |
| |
| <p>The |
| default value is <samp class="codeph">false</samp>.</p> |
| |
| <p> |
| |
| |
| This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">language code</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets metadata in the resulting SWF file. |
| For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ac3_verapache">Adding metadata |
| to SWF files</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">library-path <em>path-element [...]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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.</p> |
| |
| <p>The default value of the <samp class="codeph">library-path</samp> option |
| includes all SWC files in the libs and libs/player directories, |
| plus the current locale directory. These are required.</p> |
| |
| <p>To |
| point to individual classes or packages rather than entire SWC files, |
| use the <samp class="codeph">source-path</samp> option.</p> |
| |
| <p>If you set the |
| value of the <samp class="codeph">library-path</samp> 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 <samp class="codeph">library-path</samp> but |
| replaces it, unless you use the += operator.</p> |
| |
| <p>On the command |
| line, you use the += operator to append the new argument to the |
| list of existing SWC files.</p> |
| |
| <p> |
| |
| |
| |
| In |
| a configuration file, you can set the <samp class="codeph">append</samp> attribute |
| of the <samp class="codeph">library-path</samp> tag to <samp class="codeph">true</samp> to |
| indicate that the values should be appended to the library path |
| rather than replace existing default entries.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">license <em>product_name</em> <em>license_key</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Defines the license key to use when compiling.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">link-report <em>filename</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Prints linking information to the specified |
| output file. This file is an XML file that contains <samp class="codeph"><def></samp>, <samp class="codeph"><pre></samp>, |
| and <samp class="codeph"><ext></samp> symbols showing linker dependencies |
| in the final SWF file.</p> |
| |
| <p>The output of this command can be used |
| as input to the <samp class="codeph">load-externs</samp> option. </p> |
| |
| <p>For |
| more information on the report, see <a href="flx_performance_pe.html#WS2db454920e96a9e51e63e3d11c0bf69084-7adc_verapache">Examining |
| linker dependencies</a>.</p> |
| |
| <p> |
| |
| This |
| is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">load-config <em>filename</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Specifies the location of the configuration |
| file that defines compiler options. </p> |
| |
| <p>If you specify a configuration |
| file, you can override individual options by setting them on the |
| command line.</p> |
| |
| <p>All relative paths in the configuration file |
| are relative to the location of the configuration file itself.</p> |
| |
| <p>Use |
| the <samp class="codeph">+=</samp> operator to chain this configuration file |
| to other configuration files. </p> |
| |
| <p> |
| For more information on using configuration |
| files to provide options to the command-line compilers, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fca_verapache">About |
| configuration files</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">load-externs <em>filename [...]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Specifies the location of an XML file that |
| contains <samp class="codeph"><def></samp>, <samp class="codeph"><pre></samp>, |
| and <samp class="codeph"><ext></samp> symbols to omit from linking when |
| compiling a SWF file. The XML file uses the same syntax as the one |
| produced by the <samp class="codeph">link-report</samp> option. For more information |
| on the report, see <a href="flx_performance_pe.html#WS2db454920e96a9e51e63e3d11c0bf69084-7adc_verapache">Examining |
| linker dependencies</a>.</p> |
| |
| <p>This option provides compile-time |
| link checking for external components that are dynamically linked.</p> |
| |
| <p>For |
| more information about dynamic linking, see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f1e_verapache">About |
| linking</a>.</p> |
| |
| <p> |
| |
| This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">locale <em>locale[,...]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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. </p> |
| |
| <p>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.</p> |
| |
| <p> |
| |
| For |
| more information, see <a href="flx_l10n_ln.html#WS19f279b149e7481c-1c03f02c12bd00c4763-8000_verapache">Localization</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">localized-description <em>text lang</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets metadata in the resulting SWF file. |
| For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ac3_verapache">Adding metadata |
| to SWF files</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">localized-title <em>text lang</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets metadata in the resulting SWF file. |
| For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ac3_verapache">Adding metadata |
| to SWF files</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">mxml.compatibility-version=<em>version</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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. </p> |
| |
| <p>The following example instructs the application |
| to compile with the Flex 3 rules for these behaviors:</p> |
| |
| <div class="p"> |
| <pre class="codeblock">-compatibility-version=3.0.0</pre> |
| |
| </div> |
| |
| <p>Possible |
| values for this compiler option are defined as constants in the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/FlexVersion.html" target="_blank">FlexVersion</a> class.</p> |
| |
| <p>If |
| you set this value to 3.0.0, you must also use a theme in your application |
| that is compatible with version 3 of the SDK.</p> |
| |
| <p>For more information |
| on using this option, see <a href="flx_versioning_ve.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ede_verapache">Backward |
| compatibility</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">mxml.minimum-supported-version=<em>version_number</em> |
| </samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Specifies the minimum version of the SDK |
| that the application uses. This is typically used when generating |
| SWC files. </p> |
| |
| <p>This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">mxml.qualified-type-selectors=true|false</samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Determines whether you want the compiler |
| to ensure that type selectors have a qualified namespace in the |
| CSS files.</p> |
| |
| <p>This is an advanced option. The default value is <samp class="codeph">true</samp>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">namespaces.namespace <em>uri manifest</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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.</p> |
| |
| <p> |
| For |
| more information about manifest files, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7aa8_verapache">About |
| manifest files</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">optimize=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Enables the ActionScript optimizer. This |
| optimizer reduces file size and increases performance by optimizing |
| the SWF file’s bytecode.</p> |
| |
| <p> |
| The default value is <samp class="codeph">true</samp>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">omit-trace-statements=false|true</samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Enables <samp class="codeph">trace()</samp> statements |
| from being written to the flashlog.txt file.</p> |
| |
| <p>The default value |
| is <samp class="codeph">false</samp>, which means that by default, <samp class="codeph">trace()</samp> statements |
| are written to the flashlog.txt file.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">output <em>filename</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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. </p> |
| |
| <p>The |
| default SWF filename matches the target filename, but with a SWF |
| file extension.</p> |
| |
| <p>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.</p> |
| |
| <p>The compiler creates extra directories |
| based on the specified filename if those directories are not present.</p> |
| |
| <p>When |
| using this option with the component compiler, the output is a SWC |
| file rather than a SWF file, unless you set the <samp class="codeph">directory</samp> option |
| to <samp class="codeph">true</samp>. 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 <samp class="codeph">ouput</samp> option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">preloader <em>class_name</em> |
| </samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Specify a download progress bar for your |
| application. The value must be the name of a class that implements |
| the IPreloaderDisplay interface.</p> |
| |
| <p>The default value is “mx.preloaders.SparkDownloadProgressBar” |
| when <samp class="codeph">compatibility-version</samp> is 4.0.0 or greater. |
| When <samp class="codeph">compatibility-version</samp> is less than 4.0.0, |
| the default value is “mx.preloaders.DownloadProgressBar”.</p> |
| |
| <p>For |
| more information, see <a href="flx_app_container_apc.html#WS2db454920e96a9e51e63e3d11c0bf69084-7e3c_verapache">Showing |
| the download progress of an application</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">publisher <em>name</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets metadata in the resulting SWF file. |
| For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ac3_verapache">Adding metadata |
| to SWF files</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">raw-metadata <em>XML_string</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Defines the metadata for the resulting SWF |
| file. The value of this option overrides any metadata-related compiler |
| options such as <samp class="codeph">contributor</samp>, <samp class="codeph">creator</samp>, <samp class="codeph">date</samp>, |
| and <samp class="codeph">description</samp>.</p> |
| |
| <p>This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">remove-unused-rsls=true|false</samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Instructs the compiler to only include RSLs |
| that are used by the application. The default value is <samp class="codeph">true</samp>.</p> |
| |
| <p>For |
| more information about RSLs, see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd1_verapache">Runtime |
| Shared Libraries</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">resource-bundle-list <em>filename</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Prints a list of resource bundles that are |
| used by the current application to a file named with the <samp class="codeph"> |
| <em>filename</em> |
| </samp> argument. |
| You then use this list as input that you specify with the <samp class="codeph">include-resource-bundles</samp> option |
| to create a resource module.</p> |
| |
| <p> |
| For |
| more information, see <a href="flx_resourcebundles_rb.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fcf_verapache">Resource |
| Bundles</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">runtime-shared-libraries rsl-<em>url [...]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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.</p> |
| |
| <p>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 <em>web_root</em>/libraries directory on the web server, |
| and the application in the web root, you specify libraries/library.swf.</p> |
| |
| <p>This |
| compiler argument is included for backwards compatibility with Flex |
| 3 applications. For Flex 4 applications, use the <samp class="codeph">runtime-shared-library-path</samp> option.</p> |
| |
| <p> |
| For more information about RSLs, see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd1_verapache">Runtime |
| Shared Libraries</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">runtime-shared-library-path=<em>path-</em><em>element</em>,<em>rsl-url</em>[,<em>policy-file-url</em>,<em>failover-url</em>,...]</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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.</p> |
| |
| <p>The <samp class="codeph">path-element</samp> 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 <samp class="codeph">external-library-path</samp> option |
| when compiling against an RSL using the <samp class="codeph">runtime-shared-libraries</samp> option.</p> |
| |
| <p>The <samp class="codeph">rsl-url</samp> 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.</p> |
| |
| <p>The <samp class="codeph">policy-file-url</samp> 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.</p> |
| |
| <p>The <samp class="codeph">failover-url</samp> and |
| second <samp class="codeph">policy-file-url</samp> 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.</p> |
| |
| <p>Do |
| not include spaces between the comma-separated values. The following example |
| shows how to use this option:</p> |
| |
| <div class="p"> |
| <pre class="codeblock">mxmlc -o=../lib/app.swf -runtime-shared-library-path=../lib/mylib.swc,../bin/myrsl.swf Main.mxml</pre> |
| |
| </div> |
| |
| <p>You |
| can specify more than one library file to be used as an RSL. You |
| do this by adding additional <samp class="codeph">runtime-shared-library-path</samp> options.</p> |
| |
| <p>You |
| can also use the <samp class="codeph">runtime-shared-libraries</samp> command |
| to use RSLs with your applications. However, the <samp class="codeph">runtime-shared-library-path</samp> option |
| lets you also specify the location of the policy file and failover |
| RSL.</p> |
| |
| <p> |
| For |
| more information about RSLs, see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd1_verapache">Runtime |
| Shared Libraries</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">runtime-shared-library-settings.application-domain=<em>path-element</em>,<em>application-domain-target</em> |
| </samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Controls which domain an RSL is loaded into |
| at runtime.</p> |
| |
| <p>The <samp class="codeph">path-element</samp> is the path |
| of the SWC library. To specify an RSL with this option, you must |
| also define it in the <samp class="codeph">runtime-shared-library-path</samp> option.</p> |
| |
| <p>The <samp class="codeph">application-domain-target</samp> is |
| the domain that the RSL should be loaded into. Valid values for <samp class="codeph">application-domain-target</samp> are <samp class="codeph">default</samp>, <samp class="codeph">current</samp>, <samp class="codeph">parent</samp>, |
| and <samp class="codeph">top-level</samp>. The default value is <samp class="codeph">default</samp>.</p> |
| |
| <p>For |
| more information about modules, see <a href="flx_modular_md.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f22_verapache">Modular |
| applications</a>. For more information about sub-applications, |
| see <a href="flx_loading_applications_la.html#WS2db454920e96a9e51e63e3d11c0bf69084-7d14_verapache">Developing |
| and loading sub-applications</a>.</p> |
| |
| <p>For more information |
| about RSLs, see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd1_verapache">Runtime |
| Shared Libraries</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">runtime-shared-library-settings.force-rsls=<em>path-element</em> |
| </samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Forces an RSL to be included, regardless |
| of whether it is used by the application. This is useful if all |
| the links to a particular class in an RSL are soft references, or |
| if you anticipate a module or sub-application to need a class that |
| is not used by the main application.</p> |
| |
| <p>The <samp class="codeph">path-element</samp> is |
| the path of the SWC library. You can specify more than one <samp class="codeph">path-element</samp> by |
| using a comma-delimited list of RSLs. To specify an RSL with this |
| option, you must also define it in the <samp class="codeph">runtime-shared-library-path</samp> option.</p> |
| |
| <p>For |
| more information about RSLs, see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd1_verapache">Runtime |
| Shared Libraries</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">services <em>filename</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Specifies the location of the services-config.xml |
| file. This file is used by LiveCycle Data Services ES.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">show-actionscript-warnings=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Shows warnings for ActionScript classes. </p> |
| |
| <p>The |
| default value is <samp class="codeph">true</samp>.</p> |
| |
| <p>For more information |
| about viewing warnings and errors, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7eaf_verapache">Viewing |
| warnings and errors</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">show-binding-warnings=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Shows a warning when Flash Player cannot |
| detect changes to a bound property.</p> |
| |
| <p>The default value is <samp class="codeph">true</samp>.</p> |
| |
| <p> |
| |
| For more information about viewing warnings |
| and errors, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7eaf_verapache">Viewing |
| warnings and errors</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">show-invalid-css-property-warnings=true|false</samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Shows a warning when a style property is |
| set in CSS on a component that does not support that property. The |
| warning can be a result of the theme not supporting the style property, |
| the component not declaring it, or the component excluding it.</p> |
| |
| <p>The |
| default value is <samp class="codeph">true</samp>.</p> |
| |
| <p>For more information |
| about viewing warnings and errors, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7eaf_verapache">Viewing |
| warnings and errors</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">show-shadowed-device-font-warnings=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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 <samp class="codeph">false</samp> to disable the warnings. </p> |
| |
| <p>The |
| default value is <samp class="codeph">true</samp>. </p> |
| |
| <p>For more information |
| about viewing warnings and errors, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7eaf_verapache">Viewing |
| warnings and errors</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">show-unused-type-selector-warnings=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Shows warnings when a type selector in a |
| style sheet or <samp class="codeph"><fx:Style></samp> block is not used |
| by any components in the application.</p> |
| |
| <p>The default value is <samp class="codeph">true</samp>.</p> |
| |
| <p>This |
| warning does not detect whether a condition is met for descendant selectors.</p> |
| |
| <p>For |
| more information about viewing warnings and errors, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7eaf_verapache">Viewing |
| warnings and errors</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">size-report=<em>filename</em> |
| </samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Creates a report that summarizes the size |
| of each type of data within an application SWF file. Types of data |
| include media files, fonts, shapes, and ActionScript.</p> |
| |
| <div class="p">For |
| example:<pre class="codeblock">mxmlc -size-report=myreport.xml MyApp.mxml</pre> |
| |
| </div> |
| |
| <p>The |
| file format of the output is XML. While the format has some similarities |
| to the output of the <samp class="codeph">link-report</samp> option, the size |
| report cannot be used as input to the <samp class="codeph">load-externs</samp> option.</p> |
| |
| <p>This |
| option is useful if you are optimizing your application and want |
| to see how big areas of your application are.</p> |
| |
| <p>For more information |
| about the size report, see <a href="flx_performance_pe.html#WS19f279b149e7481c45454d9412c561d3223-8000_verapache">Using |
| the size report</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">source-path <em>path-element [...]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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 applications |
| and includes those that are required at compile time. </p> |
| |
| <p>You |
| can use wildcards to include all files and subdirectories of a directory. </p> |
| |
| <p>To |
| link an entire library SWC file and not individual classes or directories, |
| use the <samp class="codeph">library-path</samp> option.</p> |
| |
| <p>The source path |
| is also used as the search path for the component compiler’s <samp class="codeph">include-classes</samp> and <samp class="codeph">include-resource-bundles</samp> options.</p> |
| |
| <p> |
| You can also use the += operator |
| to append the new argument to the list of existing source path entries.</p> |
| |
| <p>This |
| option has the following default behavior:</p> |
| |
| <div class="p"> |
| <ul> |
| <li> |
| <p>If <samp class="codeph">source-path</samp> is |
| empty, the target file’s directory will be added to source-path.</p> |
| |
| </li> |
| |
| <li> |
| <p>If <samp class="codeph">source-path</samp> is not empty and if the target |
| file’s directory is a subdirectory of one of the directories in <samp class="codeph">source-path</samp>, <samp class="codeph">source-path</samp> remains unchanged.</p> |
| |
| </li> |
| |
| <li> |
| <p>If <samp class="codeph">source-path</samp> is not empty and if the target |
| file’s directory is not a subdirectory of any one of the directories |
| in <samp class="codeph">source-path</samp>, the target file’s directory is |
| prepended to <samp class="codeph">source-path</samp>.</p> |
| |
| </li> |
| |
| </ul> |
| |
| </div> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">static-link-runtime-shared-libraries=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Determines whether to compile against libraries |
| statically or use RSLs. Set this option to <samp class="codeph">true</samp> to |
| ignore the RSLs specified by the <samp class="codeph">runtime-shared-library-path</samp> option. |
| Set this option to <samp class="codeph">false</samp> to use the RSLs.</p> |
| |
| <p>The |
| default value is <samp class="codeph">true</samp>. </p> |
| |
| <p>This option is useful |
| so that you can quickly switch between a statically and dynamically |
| linked application without having to change the <samp class="codeph">runtime-shared-library-path</samp> option, |
| which can be verbose, or edit the configuration files. </p> |
| |
| <p> |
| For more information about RSLs, see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd1_verapache">Runtime |
| Shared Libraries</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">strict=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Prints undefined property and function calls; |
| also performs compile-time type checking on assignments and options |
| supplied to method calls.\</p> |
| |
| <p>The default value is <samp class="codeph">true</samp>.</p> |
| |
| <p> |
| |
| For |
| more information about viewing warnings and errors, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7eaf_verapache">Viewing |
| warnings and errors</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">swf-version=<em>int</em> |
| </samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Specifies the SWF file format version of |
| the output SWF file. Features requiring a later version of the SWF |
| file format are not compiled into the application. This is different |
| from the Player version in that it refers to the SWF specification |
| versioning scheme. </p> |
| |
| <p>For Flex 4.6, the default value of <samp class="codeph">swf-version</samp> is |
| 14 (and the default Player version is 11.1). </p> |
| |
| <p>This is an advanced |
| option.</p> |
| |
| <p>For more information, see <a href="flx_versioning_ve.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ee0_verapache">Targeting |
| Flash Player versions</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">target-player=<em>major_version[.minor_version.revision]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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.</p> |
| |
| <p>The <samp class="codeph"> |
| <em>player_version</em> |
| </samp> parameter |
| has the following format:</p> |
| |
| <div class="p"> |
| <pre class="codeblock"><em>major_version.minor_version.revision</em></pre> |
| |
| </div> |
| |
| <p>The <samp class="codeph"> |
| <em>major_version</em> |
| </samp> is |
| required while <samp class="codeph"> |
| <em>minor_version</em> |
| </samp> and <samp class="codeph"> |
| <em>revision</em> |
| </samp> are optional. |
| For Flex 4.0 and 4.1, the minimum value is 10.0.0. If you do not |
| specify the <samp class="codeph"> |
| <em>minor_version</em> |
| </samp> or <samp class="codeph"> |
| <em>revision</em> |
| </samp>, |
| then the compiler uses zeros. For Flex 4.5, the default value is |
| 10.2.0. For Flex 4.6, the default value is 11.1.</p> |
| |
| <p>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. </p> |
| |
| <p>This option |
| is useful if your application’s audience has a specific Player and cannot |
| upgrade. You can use this option to “downgrade” your application |
| for that audience. </p> |
| |
| <p>For more information, see <a href="flx_versioning_ve.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ee0_verapache">Targeting |
| Flash Player versions</a> |
| </p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">theme <em>filename [...]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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. </p> |
| |
| <p> |
| For |
| information on compiling a SWC theme file, see <a href="flx_styles_st.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fee_verapache">Styles |
| and themes</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">title <em>text</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Sets metadata in the resulting SWF file. |
| For more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ac3_verapache">Adding metadata |
| to SWF files</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">tools-locale=<em>locale</em> |
| </samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Specifies the locale to use when reporting |
| compiler errors and warnings. Valid values are the language code |
| (such as "ja" or "en") or the language code plus country code (such |
| as "ja_JP" or "en_US"), depending on your system's configuration.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">use-direct-blit=false|true</samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Specifies whether hardware acceleration |
| is used to copy graphics to the screen (if such acceleration is |
| available). </p> |
| |
| <p>This option only applies to applications running |
| in the standalone Flash Player. For applications running in a browser, |
| setting <samp class="codeph">use-direct-blit</samp> to <samp class="codeph">true</samp> is |
| equivalent to setting <samp class="codeph">wmode</samp> to <samp class="codeph">"direct"</samp> in |
| the HTML wrapper. For AIR applications, use the <samp class="codeph">renderMode</samp> application |
| descriptor tag.</p> |
| |
| <p>The default value is <samp class="codeph">false</samp>.</p> |
| |
| <p>This |
| is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <p> |
| <samp class="codeph">use-gpu=false|true</samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Specifies whether GPU (Graphics Processing |
| Unit) acceleration is used when drawing graphics (if such acceleration |
| is available). </p> |
| |
| <p>This option only applies to applications running |
| in the standalone Flash Player. For applications running in a browser, |
| setting <samp class="codeph">use-gpu</samp> to <samp class="codeph">true</samp> is equivalent |
| to setting <samp class="codeph">wmode</samp> to <samp class="codeph">"gpu"</samp> in the |
| HTML wrapper. For AIR applications, use the <samp class="codeph">renderMode</samp> application |
| descriptor tag.</p> |
| |
| <p>The default value is <samp class="codeph">false</samp>.</p> |
| |
| <p>This |
| is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">use-network=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Specifies that the current application uses |
| network services.</p> |
| |
| <p>The default value is <samp class="codeph">true</samp>. </p> |
| |
| <p>When |
| the <samp class="codeph">use-network</samp> property is set to <samp class="codeph">false</samp>, |
| the application can access the local filesystem (for example, use |
| the <samp class="codeph">XML.load()</samp> method with file: URLs) but not |
| network services. In most circumstances, the value of this property |
| should be <samp class="codeph">true</samp>.</p> |
| |
| <p> |
| For more information about the <samp class="codeph">use-network</samp> property, |
| see <a href="flx_security2_se.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f9b_verapache">Security</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">use-resource-bundle-metadata=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Enables resource bundles. Set to <samp class="codeph">true</samp> to |
| instruct the compiler to process the contents of the <samp class="codeph">[ResourceBundle]</samp> metadata |
| tag.</p> |
| |
| <p>The default value is <samp class="codeph">true</samp>.</p> |
| |
| <p> |
| For more information, see <a href="flx_resourcebundles_rb.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fcf_verapache">Resource |
| Bundles</a>.</p> |
| |
| <p>This is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">verbose-stacktraces=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Generates source code that includes line |
| numbers. When a run-time error occurs, the stacktrace shows these |
| line numbers.</p> |
| |
| <p>Enabling this option generates larger SWF files.</p> |
| |
| <p>Enabling |
| this option does not generate a debug SWF file. To do that, you |
| must set the <samp class="codeph">debug</samp> option to <samp class="codeph">true</samp>.</p> |
| |
| <p> |
| The default value is <samp class="codeph">false</samp>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">verify-digests=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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.</p> |
| |
| <p> |
| For |
| more information about RSLs, see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd1_verapache">Runtime |
| Shared Libraries</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">version</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>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.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">warn-warning_type=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Enables specified warnings. For more information, |
| see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7eaf_verapache">Viewing |
| warnings and errors</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1531 "> |
| <div class="p"> |
| <pre class="codeblock">warnings=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e1537 "> |
| <p>Enables all warnings. Set to <samp class="codeph">false</samp> to |
| disable all warnings. This option overrides the <samp class="codeph">warn-</samp> |
| <samp class="codeph"> |
| <em>warning_type</em> |
| </samp> options.</p> |
| |
| <p> |
| The default value is <samp class="codeph">true</samp>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| </tbody> |
| |
| </table> |
| </div> |
| |
| <p>The following sections provide examples of using the mxmlc application compiler |
| options on the command line.</p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fe9_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fe9_verapache"><!-- --></a> |
| <h3 class="topictitle3">Basic example of using mxmlc</h3> |
| |
| |
| <div> |
| <p>The most basic example is one in which the MXML file has |
| no external dependencies (such as components in a SWC file or ActionScript |
| classes) and no special options. In this case, you invoke the mxmlc |
| compiler and point it to your MXML file as the following example |
| shows:</p> |
| |
| <pre class="codeblock"> mxmlc c:/myfiles/app.mxml</pre> |
| |
| <p>The default option is the target file to compile into a SWF file, |
| and it is required to have a value. If you use a space-separated |
| list as part of the options, you can terminate the list with a double |
| hyphen before adding the target file; for example:</p> |
| |
| <pre class="codeblock"> mxmlc -option arg1 arg2 arg3 -- target_file.mxml</pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7ac3_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7ac3_verapache"><!-- --></a> |
| <h3 class="topictitle3">Adding metadata to SWF files</h3> |
| |
| |
| <div> |
| <p> |
| |
| |
| The application compilers support |
| adding metadata to SWF files. This metadata can be used by search |
| engines and other utilities to gather information about the SWF |
| file. This metadata represents a subset of the Dublin Core schema.</p> |
| |
| <p>You can set the following values:</p> |
| |
| <ul> |
| <li> |
| <p> |
| <samp class="codeph">contributor</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">creator</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">date</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">description</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">language</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">localized-description</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">localized-title</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">publisher</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">title</samp> |
| </p> |
| |
| </li> |
| |
| </ul> |
| |
| <p>For the mxmlc command-line compiler, the default metadata settings |
| in the flex-config.xml file are as follows:</p> |
| |
| <pre class="codeblock"> <metadata> |
| <title>Flex 4 Application</title> |
| <description>http://www.adobe.com/products/flex</description> |
| <publisher>unknown</publisher> |
| <creator>unknown</creator> |
| <language>EN</language> |
| </metadata></pre> |
| |
| <p>You can also set the metadata values as command-line options. |
| The following example sets some of the metadata values:</p> |
| |
| <pre class="codeblock"> mxmlc -language+=klingon -title "checkintest!" |
| -localized-description "it r0x0rs" en-us |
| -localized-description "c'est magnifique!" fr-fr |
| -creator "Flexy Frank" -publisher "Franks Beans" flexstore.mxml</pre> |
| |
| <p>In this example, the following values are compiled into the resulting |
| SWF file:</p> |
| |
| <pre class="codeblock"> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'> |
| <rdf:Description rdf:about='' xmlns:dc='http://purl.org/dc/elements/1.1'> |
| <dc:format>application/x-shockwave-flash</dc:format> |
| <dc:title>checkintest!</dc:title> |
| <dc:description> |
| <rdf:Alt> |
| <rdf:li xml:lang='fr-fr'>c'est magnifique!</rdf:li> |
| <rdf:li xml:lang='x-default'>http://www.adobe.com/products/flex</rdf:li> |
| <rdf:li xml:lang='en-us'>it r0x0rs</rdf:li> |
| </rdf:Alt> |
| </dc:description> |
| <dc:publisher>Franks Beans</dc:publisher> |
| <dc:creator>Flexy Frank</dc:creator> |
| <dc:language>EN</dc:language> |
| <dc:language>klingon</dc:language> |
| <dc:date>Mar 16, 2010</dc:date> |
| </rdf:Description> |
| </rdf:RDF></pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7ac4_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7ac4_verapache"><!-- --></a> |
| <h3 class="topictitle3">Setting the file encoding</h3> |
| |
| |
| <div> |
| <p> |
| |
| |
| |
| |
| |
| You |
| use the <samp class="codeph">actionscript-file-encoding</samp> option to set |
| the file encoding so that the application compiler correctly interprets |
| ActionScript files. This tag does not affect MXML files because |
| they are XML files that contain an encoding specification in the <samp class="codeph">xml</samp> tag. </p> |
| |
| <p> |
| |
| You use the <samp class="codeph">actionscript-file-encoding</samp> option |
| when your ActionScript files do not contain a Byte Order Mark (BOM), |
| and the files use an encoding that is different from the default |
| encoding of your computer. If your ActionScript files contain a |
| BOM, the compiler uses the information in the BOM to determine the |
| file encoding. </p> |
| |
| <p>For example, if your ActionScript files use Shift_JIS encoding, |
| have no BOM, and your computer uses ISO-8859-1 as the default encoding, |
| you use the <samp class="codeph">actionscript-file-encoding</samp> option, |
| as the following example shows:</p> |
| |
| <pre class="codeblock"> actionscript-file-encoding=Shift_JIS</pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7abf_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7abf_verapache"><!-- --></a> |
| <h3 class="topictitle3">Editing application settings</h3> |
| |
| |
| <div> |
| <p>The mxmlc compiler includes options to set the application’s |
| frame rate, size, and script limits. By setting them when you compile |
| your application, you do not need to edit the HTML wrapper or the |
| application’s MXML file. You can override these settings by using |
| properties of the <samp class="codeph"><s:Application></samp> tag or |
| properties of the <samp class="codeph"><object></samp> and <samp class="codeph"><embed></samp> tags |
| in the HTML wrapper.</p> |
| |
| <p>The following command-line example sets default application properties:</p> |
| |
| <pre class="codeblock"> mxmlc -default-size 240 240 -default-frame-rate=24 -default-script-limits 5000 10 -- c:/myfiles/flex/misc/MainApp.mxml</pre> |
| |
| <p>For more information about the Application class, see <a href="flx_app_container_apc.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ee7_verapache">Application |
| containers </a>.</p> |
| |
| <p>For more information about the HTML wrapper, see <a href="flx_wrapper_wr.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ecf_verapache">Creating |
| a wrapper</a>.</p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fe5_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fe5_verapache"><!-- --></a> |
| <h3 class="topictitle3">Using SWC files</h3> |
| |
| |
| <div> |
| <p> |
| |
| |
| |
| Often, you use SWC files when compiling |
| MXML files. SWC files can provide themes, components, or other helper |
| files. You typically specify SWC files used by the application by |
| using the <samp class="codeph">library-path</samp> option. </p> |
| |
| <p>The following example compiles the RotationApplication.mxml file |
| into the RotationApplication.swf file:</p> |
| |
| <pre class="codeblock"> mxmlc -library-path+=c:/mylibraries/MyButtonSwc.swc c:/myfiles/comptest/testRotation.mxml</pre> |
| |
| <p>In a configuration file, this appears as follows:</p> |
| |
| <pre class="codeblock"> <compiler> |
| <library-path> |
| <path-element>libs</path-element> |
| <path-element>libs/player</path-element> |
| <path-element>libs/player/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}</path-element> |
| <path-element>locale/{locale}</path-element> |
| <path-element>c:/mylibraries/MyButtonSwc.swc</path-element> |
| </library-path> |
| </compiler></pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7ed3_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7ed3_verapache"><!-- --></a> |
| <h3 class="topictitle3">About incremental compilation</h3> |
| |
| |
| <div> |
| <p> |
| |
| |
| You can use incremental compilation |
| to decrease the time it takes to compile an application or component |
| library with the application compilers. When incremental compilation |
| is enabled, the compiler inspects changes to the bytecode between |
| revisions and only recompiles the section of bytecode that has changed. |
| These sections of bytecode are also referred to as <em>compilation units</em>.</p> |
| |
| <p>You enable incremental compilation by setting the <samp class="codeph">incremental</samp> option |
| to <samp class="codeph">true</samp>, as the following example shows:</p> |
| |
| <pre class="codeblock"> mxmlc -incremental=true MyApp.mxml</pre> |
| |
| <p>Incremental compilation means that the compiler inspects your |
| code, determines which parts of the application are affected by |
| your changes, and only recompiles the newer classes and assets. |
| The Flex compilers generate many compilation units that do not change |
| between compilation cycles. It is possible that when you change |
| one part of your application, the change might not have any effect |
| on the bytecode of another. </p> |
| |
| <p>As part of the incremental compilation process, the compiler |
| generates a cache file that lists the compilation units of your |
| application and information on your application’s structure. This |
| file is located in the same directory as the file that you are compiling. |
| For example, if my application is called MyApp.mxml, the cache file |
| is called MyApp.mxml.cache. This file helps the compiler determine |
| which parts of your application must be recompiled. One way to force |
| a complete recompile is to delete the cache file from the directory. </p> |
| |
| <p>Incremental compilation can help reduce compile time on small |
| applications, but you achieve the biggest gains on larger applications. </p> |
| |
| <p>For the mxmlc command-line compiler, the default is <samp class="codeph">false</samp>. </p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7abd_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7abd_verapache"><!-- --></a> |
| <h3 class="topictitle3">Using conditional compilation</h3> |
| |
| |
| <div> |
| <p> |
| |
| |
| To include or exclude blocks of code |
| for certain builds, you can use conditional compilation. The mxmlc |
| compiler lets you pass the values of constants to the application |
| at compile time. Commonly, you pass a Boolean that is used to include |
| or exclude a block of code such as debugging or instrumentation |
| code. The following example conditionalizes a block of code by using |
| an inline constant Boolean:</p> |
| |
| <pre class="codeblock"> CONFIG::debugging { |
| // Execute debugging code here. |
| }</pre> |
| |
| <p>To pass constants, you use the <samp class="codeph">compiler.define</samp> compiler |
| option. The constant can be a Boolean, String, or Number, or an |
| expression that can be evaluated in ActionScript at compile time. |
| This constant is then accessible within the application source code |
| as a global constant. </p> |
| |
| <p>To use the <samp class="codeph">define</samp> option, you define a configuration |
| namespace for the constant, a variable name, and a value using the |
| following syntax:</p> |
| |
| <pre class="codeblock"> -define=<em>namespace</em>::<em>variable_name</em>,<em>value</em></pre> |
| |
| <p>The configuration namespace can be anything you want. The following |
| example defines the constant <samp class="codeph">debugging</samp> with a value |
| of <samp class="codeph">true</samp> in the <samp class="codeph">CONFIG</samp> namespace:</p> |
| |
| <pre class="codeblock"> -define=CONFIG::debugging,true</pre> |
| |
| <p>You use the <samp class="codeph">+=</samp> operator rather than the <samp class="codeph">=</samp> operator |
| to append definitions on the command line to the definitions set |
| in the configuration file. Use the <samp class="codeph">=</samp> operator to |
| replace the definitions in the configuration file with the definitions |
| on the command line.</p> |
| |
| <p>To set the values of multiple constants on the command-line, |
| use the <samp class="codeph">define</samp> option more than once; for example:</p> |
| |
| <pre class="codeblock"> mxmlc -define+=CONFIG::debugging,true -define+=CONFIG::release,false MyApp.mxml</pre> |
| |
| <p>To set the value of these constants in the flex-config.xml file, |
| rather than on the command line, you write this as the following |
| example shows:</p> |
| |
| <pre class="codeblock"> <compiler> |
| <define append="true"> |
| <name>CONFIG::debugging</name> |
| <value>true</value> |
| </define> |
| <define append="true"> |
| <name>CONFIG::release</name> |
| <value>false</value> |
| </define> |
| </compiler></pre> |
| |
| <p>If you set the same definition in a configuration file and on |
| the command line, the value on the command line takes precedence.</p> |
| |
| <p>In a Flex Ant task, you can set constants with a <samp class="codeph">define</samp> element, |
| as the following example shows:</p> |
| |
| <pre class="codeblock"> <mxmlc ... > |
| <define name="CONFIG::debugging" value="true"/> |
| <define name="CONFIG::release" value="false"/> |
| </mxmlc></pre> |
| |
| </div> |
| |
| <div class="nested3" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fe2_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fe2_verapache"><!-- --></a> |
| <h4 class="topictitle4">Using inline constants</h4> |
| |
| |
| <div> |
| <p>You can use inline constants in ActionScript. Boolean values |
| can be used to conditionalize top-level definitions of functions, |
| classes, and variables, in much the same way you would use an <samp class="codeph">#IFDEF</samp> preprocessor |
| command in C or C++. You cannot use constant Boolean values to conditionalize |
| metadata or <samp class="codeph">import</samp> statements. </p> |
| |
| <p>The following example conditionalizes which class definition |
| the compiler uses when compiling the application: </p> |
| |
| <pre class="noswf">// compilers/MyButton.as |
| package { |
| import mx.controls.Button; |
| |
| CONFIG::debugging |
| public class MyButton extends Button { |
| public function MyButton() { |
| super(); |
| // Set the label text to blue. |
| setStyle("color", 0x0000FF); |
| } |
| } |
| |
| CONFIG::release |
| public class MyButton extends Button { |
| public function MyButton() { |
| super(); |
| // Set the label text to red. |
| setStyle("color", 0xFF0000); |
| } |
| } |
| }</pre> |
| |
| <p>You can also pass Strings and Numbers to the application and |
| use them as inline constants, in the same way you might use a <samp class="codeph">#define</samp> directive |
| in C or C++. For example, if you pass a value named <samp class="codeph">NAMES::Company</samp>, |
| you replace it with a constant in your application by using an ActionScript |
| statement like the following example shows:</p> |
| |
| <pre class="codeblock"> private static const companyName:String = NAMES::Company;</pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested3" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fe1_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fe1_verapache"><!-- --></a> |
| <h4 class="topictitle4">Passing expressions</h4> |
| |
| |
| <div> |
| <p>You can pass expressions that can be evaluated at compile |
| time as the value of the constant. The following example evaluates |
| to false:</p> |
| |
| <pre class="codeblock"> -define+=CONFIG::myConst,"1 > 2"</pre> |
| |
| <p>The following example evaluates to 3:</p> |
| |
| <pre class="codeblock"> -define+=CONFIG::myConst,"4 - 1"</pre> |
| |
| <p>Expressions can contain constants and other configuration values; |
| for example:</p> |
| |
| <pre class="codeblock"> -define+=CONFIG::bool2,false -define+=CONFIG::and1,"CONFIG::bool2 && false"</pre> |
| |
| <p>In general, you should wrap all constants with double quotes, |
| so that the mxmlc compiler correctly parses them as a single argument.</p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested3" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fe0_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fe0_verapache"><!-- --></a> |
| <h4 class="topictitle4">Passing Strings</h4> |
| |
| |
| <div> |
| <p>When passing Strings, you must add extra quotes to ensure |
| that the compiler parses them correctly.</p> |
| |
| <p>To define Strings on the command-line, you must surround them |
| with double-quotes, <em>and</em> either escape-quote them (<samp class="codeph">"\"Acme Systems\""</samp> or <samp class="codeph">"\\x\\x</samp>) or |
| single-quote them (<samp class="codeph">"'Acme Systems'"</samp>). </p> |
| |
| <p>The following example shows both methods of including Strings |
| on the command line:</p> |
| |
| <pre class="codeblock"> -define+=NAMES::Company,"’Adobe Systems’" -define+=NAMES::Ticker,"\"ADBE\""</pre> |
| |
| <p>To define Strings in configuration files, you must surround them |
| with single or double quotes; for example:</p> |
| |
| <pre class="codeblock"> <define> |
| <name>NAMES::Company</name> |
| <value>'Adobe Systems'</value> |
| </define> |
| <define> |
| <name>NAMES::Ticker</name> |
| <value>"ADBE"</value> |
| </define></pre> |
| |
| <p>To pass empty Strings on the command line, use single quotes |
| surrounded by double quotes, as the following example shows:</p> |
| |
| <pre class="codeblock"> -define+=CONFIG::debugging,"’’" </pre> |
| |
| <p>To pass empty Strings in configuration files, use double quotes |
| (<samp class="codeph">""</samp>) or single quotes (<samp class="codeph">‘ ‘</samp>).</p> |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested1" id="WS2db454920e96a9e51e63e3d11c0bf69084-7fd2_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7fd2_verapache"><!-- --></a> |
| <h2 class="topictitle2">Using compc, the component compiler</h2> |
| |
| |
| <div> |
| <p>You use the component compiler to generate a SWC file from |
| component source files and other asset files such as images and |
| style sheets.</p> |
| |
| <p> |
| |
| To use the component compiler with |
| Flex SDK, you use the compc command-line utility. </p> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7a80_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7a80_verapache"><!-- --></a> |
| <h3 class="topictitle3">About the component compiler options</h3> |
| |
| |
| <div> |
| <p> |
| The component |
| compiler options let you define settings such as the classes, resources, |
| and namespaces to include in the resulting SWC file. </p> |
| |
| <p>The component compiler can take most of the application compiler |
| options, and the options described in this section. For a description |
| of the application compiler options, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a92_verapache">About |
| the application compiler options</a>. Application compiler options |
| that do not apply to the component compiler include the metadata |
| options (such as <samp class="codeph">contributor</samp>, <samp class="codeph">title</samp>, |
| and <samp class="codeph">date</samp>), default application options (such as <samp class="codeph">default-frame-rate</samp>), <samp class="codeph">locale</samp>, <samp class="codeph">debug-password</samp>, |
| and <samp class="codeph">theme</samp>.</p> |
| |
| <p> |
| The component compiler |
| has compiler options that the application compilers do not have. |
| The following table describes the component compiler options that |
| are not used by the application compilers:</p> |
| |
| |
| <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"> |
| |
| |
| <thead align="left"> |
| <tr> |
| <th class="cellrowborder" valign="top" width="NaN%" id="d107933e5653"> |
| <p>Option</p> |
| |
| </th> |
| |
| <th class="cellrowborder" valign="top" width="NaN%" id="d107933e5659"> |
| <p>Description</p> |
| |
| </th> |
| |
| </tr> |
| |
| </thead> |
| |
| <tbody> |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5653 "> |
| <div class="p"> |
| <pre class="codeblock">compute-digest=true|false</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5659 "> |
| <p>Writes a digest to the catalog.xml of a |
| library. Use this when the library will be used as a cross-domain |
| RSL or when you want to enforce the versioning of RSLs. The default |
| value is true.</p> |
| |
| <p> |
| For |
| more information about RSLs, see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd1_verapache">Runtime |
| Shared Libraries</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5653 "> |
| <div class="p"> |
| <pre class="codeblock">directory=false|true</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5659 "> |
| <p>Outputs the SWC file in an open directory |
| format rather than a SWC file. You use this option with the <samp class="codeph">output</samp> option |
| to specify a destination directory, as the following example shows:</p> |
| |
| <div class="p"> |
| <pre class="codeblock">compc -directory=true -output=destination_directory</pre> |
| |
| </div> |
| |
| <p>You |
| typically use this option when you create RSLs because you must |
| extract the library.swf file from the SWC file before deployment. |
| For more information, see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd1_verapache">Runtime |
| Shared Libraries</a>.</p> |
| |
| <p>The default value is false.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5653 "> |
| <div class="p"> |
| <pre class="codeblock">include-classes <em>class [...]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5659 "> |
| <p>Specifies classes to include in the SWC |
| file. You provide the class name (for example, MyClass) rather than |
| the file name (for example, MyClass.as) to the file for this option. |
| As a result, all classes specified with this option must be in the |
| compiler’s source path. You specify this by using the <samp class="codeph">source-path</samp> compiler |
| option. </p> |
| |
| <p>You can use packaged and unpackaged classes. To use |
| components in namespaces, use the <samp class="codeph">include-namespaces</samp> option.</p> |
| |
| <p>If |
| the components are in packages, ensure that you use dot-notation |
| rather than slashes to separate package levels. </p> |
| |
| <p> |
| |
| This |
| is the default option for the component compiler.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5653 "> |
| <div class="p"> |
| <pre class="codeblock">include-file <em>name path [...]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5659 "> |
| <p>Adds the file to the SWC file. This option |
| does not embed files inside the library.swf file. This is useful |
| for adding graphics files, where you want to add non-compiled files |
| that can be referenced in a style sheet or embedded as assets in |
| MXML files.</p> |
| |
| <p>If you add a stylesheet that references compiled |
| resources such as programmatic skins, use the <samp class="codeph">include-stylesheet</samp> option.</p> |
| |
| <p>If |
| you use the <samp class="codeph">[Embed]</samp> syntax to add a resource to |
| your application, you are not required to use this option to also |
| link it into the SWC file.</p> |
| |
| <p> |
| |
| For |
| more information, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ac6_verapache">Adding |
| nonsource classes</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5653 "> |
| <div class="p"> |
| <pre class="codeblock">include-lookup-only=false|true</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5659 "> |
| <p>If <samp class="codeph">true</samp>, only manifest |
| entries with <samp class="codeph">lookupOnly=true</samp> are included in the |
| SWC catalog. The default value is <samp class="codeph">false</samp>. </p> |
| |
| <p>This |
| is an advanced option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5653 "> |
| <div class="p"> |
| <pre class="codeblock">include-namespaces <em>uri [...]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5659 "> |
| <p>Specifies namespace-style components in |
| the SWC file. You specify a list of URIs to include in the SWC file. |
| The uri argument must already be defined with the <samp class="codeph">namespace</samp> option.</p> |
| |
| <p>To |
| use components in packages, use the <samp class="codeph">include-classes</samp> option.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5653 "> |
| <div class="p"> |
| <pre class="codeblock">include-sources <em>path-element</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5659 "> |
| <p>Specifies classes or directories to add |
| to the SWC file. When specifying classes, you specify the path to |
| the class file (for example, MyClass.as) rather than the class name itself |
| (for example, MyClass). This lets you add classes to the SWC file |
| that are not in the source path. In general, though, use the <samp class="codeph">include-classes</samp> option, |
| which lets you add classes that are in the source path.</p> |
| |
| <p>If |
| you specify a directory, this option includes all files with an |
| MXML or AS extension, and ignores all other files.</p> |
| |
| <p>If you |
| use this option to include MXML components that are in a non-default |
| package, you must include the source folder in the source path.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5653 "> |
| <div class="p"> |
| <pre class="codeblock">include-stylesheet <em>name</em> <em>path [...]</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e5659 "> |
| <p>Specifies stylesheets to add to the SWC |
| file. This option compiles classes that are referenced by the stylesheet |
| before including the stylesheet in the SWC file.</p> |
| |
| <p>You do not |
| need to use this option for all stylesheets; only stylesheets that |
| reference assets that need to be compiled such as programmatic skins |
| or other class files. If your stylesheet does not reference compiled |
| assets, you can use the <samp class="codeph">include-file</samp> option.</p> |
| |
| <p>This |
| option does not compile the stylesheet into a SWF file before including |
| it in the SWC file. You compile a CSS file into a SWF file when |
| you want to load it at run time.</p> |
| |
| </td> |
| |
| </tr> |
| |
| </tbody> |
| |
| </table> |
| </div> |
| |
| <p>On the command line, you cannot point the compc utility to a |
| single directory and have it compile all components and source files |
| in that directory. You must specify each source file to compile. </p> |
| |
| <p>If you have a large set of components in a namespace to include |
| in a SWC file, you can use a manifest file to avoid having to type |
| an unwieldy compc command. For information on creating manifest |
| files, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7aa8_verapache">About |
| manifest files</a>.</p> |
| |
| <p>The following sections describe common scenarios where you could |
| use the compc command-line compiler.</p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fdd_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fdd_verapache"><!-- --></a> |
| <h3 class="topictitle3">Compiling stand-alone components |
| and classes</h3> |
| |
| |
| <div> |
| <p> |
| |
| In |
| many cases, you have one or more components that you use in your |
| applications, but you do not have them in a package structure. You |
| want to be able to use them in the generic namespace (“*”) inside |
| your applications. In these cases, you use the <samp class="codeph">include-classes</samp> option |
| to add the components to your SWC file.</p> |
| |
| <p> |
| The following |
| command-line example compiles two MXML components, Rotation.as and |
| RotationInstance.as, into a single SWC file:</p> |
| |
| <pre class="codeblock"> compc -source-path . |
| -output c:/jrun4/servers/flex/WEB-INF/flex/user_classes/RotationClasses.swc |
| -include-classes rotationClasses.Rotation rotationClasses.RotationInstance</pre> |
| |
| <p> |
| The |
| rotationClasses directory is a subdirectory of the current directory, |
| which is in the source path. The SWC file is output to the user_classes |
| directory, so the new components require no additional configuration |
| to be used in a server environment. </p> |
| |
| <p>You use the <samp class="codeph">include-classes</samp> option to add components |
| to the SWC file. You use just the class name of the component and |
| not the full filename (for example, MyComponent rather than MyComponent.as). |
| Use dot-notation to specify the location of the component in the |
| package structure.</p> |
| |
| <p>You also set the <samp class="codeph">source-path</samp> to the current |
| directory or a directory from which the component directory can |
| be determined. </p> |
| |
| <p>You can also add the framework.swc and framework_rb.swc files |
| to the <samp class="codeph">library-path</samp> option. This addition is not |
| always required if the compiler can determine the location of these |
| SWC files on its own. However, if you move the compiler utility |
| out of the default location relative to the frameworks files, you must |
| add it to the library path.</p> |
| |
| <p>The previous command-line example appears in a configuration |
| file as follows:</p> |
| |
| <pre class="codeblock"> <compiler> |
| <source-path> |
| <path-element>.</path-element> |
| </source-path> |
| <output> |
| c:/jrun4/servers/flex/WEB-INF/flex/user_classes/RotationClasses.swc |
| </output> |
| </compiler> |
| <include-classes> |
| <class>rotationClasses.Rotation</class> |
| <class>rotationClasses.RotationInstance</class> |
| </include-classes></pre> |
| |
| <p>To use components that are not in a package in an application, |
| you must declare a namespace that includes the directory structure |
| of the components. The following example declares a namespace for |
| the components compiled in the previous example:</p> |
| |
| <pre class="codeblock"> <?xml version="1.0"?> |
| <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:mx="library://ns.adobe.com/flex/mx" |
| <strong>xmln:local="rotationclasses.*"</strong>> |
| ... |
| <local:Rotation id="Rotate75" angleFrom="0" angleTo="75" duration="100"/> |
| ... |
| </s:Application></pre> |
| |
| <p>To use the generic namespace of “*” rather than a namespace that |
| includes a component’s directory structure, you can include the |
| directory in the <samp class="codeph">source-path</samp> as the following command-line |
| example shows:</p> |
| |
| <pre class="codeblock"> compc <strong>-source-path . c:/flexdeploy/comps/rotationClasses</strong> |
| -output c:/jrun4/servers/flex/WEB-INF/flex/user_classes/RotationComps.swc |
| -include-classes Rotation RotationInstance</pre> |
| |
| <p>Then, you can specify the namespace in your application as:</p> |
| |
| <pre class="codeblock"> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:mx="library://ns.adobe.com/flex/mx" |
| <strong>xmln:local="*"</strong>></pre> |
| |
| <p>You are not required to use the directory name in the <samp class="codeph">include-classes</samp> option |
| if you add the directory to the source path. </p> |
| |
| <p>These options appear in a configuration file, as the following |
| example shows:</p> |
| |
| <pre class="codeblock"> <compiler> |
| <source-path> |
| <path-element>.</path-element> |
| <path-element>c:/flexdeploy/comps/rotationClasses</path-element> |
| </source-path> |
| <output>c:/jrun4/servers/flex/WEB-INF/flex/user_classes/RotationComps.swc</output> |
| </compiler> |
| <include-classes> |
| <class>Rotation</class> |
| <class>RotationInstance</class> |
| <include-classes></pre> |
| |
| <p>This example assumes that the components are not in a named package. |
| For information about compiling packaged components, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a71_verapache">Compiling |
| components in packages</a>.</p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7a71_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7a71_verapache"><!-- --></a> |
| <h3 class="topictitle3">Compiling components in packages</h3> |
| |
| |
| <div> |
| <p> |
| |
| |
| |
| Some |
| components are created inside packages or directory structures so |
| that they can be logically grouped and separated from application |
| code. As a result, packaged components can have a namespace declaration |
| that includes the package name or a unique namespace identifier |
| that references their location within a package. </p> |
| |
| <p>You compile packaged components similarly to how you compile |
| components that are not in packages. The only difference is that |
| you must use the package name in the namespace declaration, regardless |
| of how you compiled the SWC file, and that package name uses dot-notation |
| instead of slashes. You must be sure to specify the location of |
| the classes in the <samp class="codeph">source-path</samp>.</p> |
| |
| <p>In the following command-line example, the MyButton component |
| is in the mypackage package:</p> |
| |
| <pre class="codeblock"> compc -source-path . c:/flexdeploy/comps/mypackage/ |
| -output c:/jrun4/servers/flex/WEB-INF/flex/user_classes/MyButtonComp.swc |
| -include-classes mypackage.MyButton</pre> |
| |
| <p>These options appear in a configuration file, as the following |
| example shows:</p> |
| |
| <pre class="codeblock"> <compiler> |
| <source-path> |
| <path-element>.</path-element> |
| <path-element>c:/flexdeploy/comps/mypackage/</path-element> |
| </source-path> |
| <output> |
| c:/jrun4/servers/flex/WEB-INF/flex/user_classes/MyButtonComp.swc |
| </output> |
| </compiler> |
| <include-classes> |
| <class>mypackage.MyButton</class> |
| <include-classes></pre> |
| |
| <p>To access the MyButton class in your application, you must declare |
| a namespace that includes its package; for example:</p> |
| |
| <pre class="codeblock"><s:Application |
| xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:mx="library://ns.adobe.com/flex/mx" |
| xmlns:mine="mypackage.*"></pre> |
| |
| <p>You can use the compc compiler to compile components from multiple |
| packages into a single SWC file. In the following command-line example, |
| the MyButton control is in the mypackage package, and the CustomComboBox |
| control is in the acme package:</p> |
| |
| <pre class="codeblock"> compc -source-path . |
| -output c:/jrun4/servers/flex/WEB-INF/flex/user_classes/CustomComps.swc |
| -include-classes mypackage.MyButton |
| acme.CustomComboBox</pre> |
| |
| <p>You then define each package as a separate namespace in your |
| MXML application:</p> |
| |
| <pre class="codeblock"> <?xml version="1.0"?> |
| <s:Application <s:Application |
| xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:mx="library://ns.adobe.com/flex/mx" |
| xmlns:mine="mypackage.*" |
| xmlns:acme="acme.*"> |
| <mine:MyButton/> |
| <acme:CustomComboBox/> |
| </s:Application></pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7a68_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7a68_verapache"><!-- --></a> |
| <h3 class="topictitle3">Compiling components using namespaces</h3> |
| |
| |
| <div> |
| <p> |
| |
| |
| |
| When |
| you have many components in one or more packages that you want to |
| add to a SWC file and want to reference from an MXML file through |
| a custom namespace, you can list them in a manifest file, then reference |
| that manifest file on the command line. Also, you can specify a |
| namespace for that component or define multiple manifest files and, |
| therefore, specify multiple namespaces to compile into a single |
| SWC file.</p> |
| |
| <p>When you use manifest files to define the components in your |
| SWC file, you specify the namespace that the components use in your |
| applications. You can compile all the components from one or more |
| packages into a single SWC file. If you have more than one package, |
| you can set it up so that all packages use a single namespace or |
| so that each package has an individual namespace.</p> |
| |
| </div> |
| |
| <div class="nested3" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fda_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fda_verapache"><!-- --></a> |
| <h4 class="topictitle4">Components in a single namespace</h4> |
| |
| |
| <div> |
| <p>In the manifest file, you define which components are in |
| a namespace. The following sample manifest file defines two components |
| to be included in the namespace:</p> |
| |
| <pre class="codeblock"> <?xml version="1.0"?> |
| <!-- SimpleManifest.xml --> |
| <componentPackage> |
| <component id="MyButton" class="MyButton"/> |
| <component id="MyOtherButton" class="MyOtherButton"/> |
| </componentPackage></pre> |
| |
| <p>The manifest file can contain references to any number of components |
| in a namespace. The <samp class="codeph">class</samp> option is the full class |
| name (including package) of the class. The <samp class="codeph">id</samp> property |
| is optional, but you can use it to define the MXML tag interface |
| that you use in your applications. If the compiler cannot find one |
| or more files listed in the manifest, it throws an error. For more |
| information on using manifest files, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7aa8_verapache">About |
| manifest files</a>.</p> |
| |
| <p>On the command line, you define the namespace with the <samp class="codeph">namespace</samp> option; for |
| example:</p> |
| |
| <pre class="codeblock"> -namespace http://mynamespace SimpleManifest.xml</pre> |
| |
| <p>Next, you target the defined namespace for inclusion in the SWC |
| file with the <samp class="codeph">include-namespaces</samp> option; for example:</p> |
| |
| <pre class="codeblock"> -include-namespaces http://mynamespace</pre> |
| |
| <p>The <samp class="codeph">namespace</samp> option matches a namespace (such |
| as “http://ns.adobe.com/mxml/2009”) with a manifest file. The <samp class="codeph">include-namespaces</samp> option |
| instructs compc to include all the components listed in that namespace’s |
| manifest file in the SWC file.</p> |
| |
| <p>After you define the manifest file, you can compile the SWC file. |
| The following command-line example compiles the components into |
| the “http://mynamespace” namespace:</p> |
| |
| <pre class="codeblock"> compc -source-path . |
| -output c:/jrun4/servers/flex/WEB-INF/flex/user_classes/MyButtons.swc |
| <strong>-namespace http://mynamespace SimpleManifest.xml</strong> |
| -include-namespaces http://mynamespace</pre> |
| |
| <p>In a configuration file, these options appear as the following |
| example shows:</p> |
| |
| <pre class="codeblock"> <compiler> |
| <source-path> |
| <path-element>.</path-element> |
| </source-path> |
| <output>c:/jrun4/servers/flex/WEB-INF/flex/user_classes/ MyButtons.swc</output> |
| <namespaces> |
| <namespace> |
| <uri>http://mynamespace</uri> |
| <manifest>SimpleManifest.xml</manifest> |
| </namespace> |
| </namespaces> |
| </compiler> |
| <include-namespaces> |
| <uri>http://mynamespace</uri> |
| <include-namespaces></pre> |
| |
| <p>In your application, you can access the components by defining |
| the new namespace in the <samp class="codeph"><s:Application></samp> tag, |
| as the following example shows:</p> |
| |
| <pre class="codeblock"> <?xml version="1.0"?> |
| <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:mx="library://ns.adobe.com/flex/mx" |
| xmlns:a="http://mynamespace"> |
| <a:MyButton/> |
| <a:MyOtherButton/> |
| </s:Application></pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested3" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fd9_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fd9_verapache"><!-- --></a> |
| <h4 class="topictitle4">Components in multiple namespaces</h4> |
| |
| |
| <div> |
| <p>You can use the compc compiler to compile components that |
| use multiple namespaces into a SWC file. Each namespace must have |
| its own manifest file. </p> |
| |
| <p>The following command-line example compiles components defined |
| in the AcmeManifest.xml and SimpleManifest.xml manifest files:</p> |
| |
| <pre class="codeblock"> compc -source-path . |
| -output c:/jrun4/servers/flex/WEB-INF/flex/user_classes/MyButtons.swc |
| -namespace http://acme2009 AcmeManifest.xml |
| -namespace http://mynamespace SimpleManifest.xml |
| -include-namespaces http://acme2009 http://mynamespace</pre> |
| |
| <p>In this case, all components in both the http://mynamespace and http://acme2009 |
| namespaces are targeted and included in the output SWC file.</p> |
| |
| <p>In a configuration file, these options appear as the following |
| example shows:</p> |
| |
| <pre class="codeblock"> <compiler> |
| <source-path> |
| <path-element>.</path-element> |
| </source-path> |
| <output>c:/jrun4/servers/flex/flex/WEB-INF/flex/user_classes/ MyButtons.swc</output> |
| <namespaces> |
| <namespace> |
| <uri>http://acme2009</uri> |
| <manifest>AcmeManifest.xml</manifest> |
| </namespace> |
| <namespace> |
| <uri>http://mynamespace</uri> |
| <manifest>SimpleManifest.xml</manifest> |
| </namespace> |
| </namespaces> |
| </compiler> |
| <include-namespaces> |
| <uri>http://acme2009</uri> |
| <uri>http://mynamespace</uri> |
| <include-namespaces></pre> |
| |
| <p>In your MXML application, you define both namespaces separately:</p> |
| |
| <pre class="codeblock"> <?xml version="1.0"?> |
| <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:mx="library://ns.adobe.com/flex/mx" |
| xmlns:simple="http://mynamespace" |
| xmlns:acme="http://acme2009"> |
| <simple:SimpleComponent/> |
| <acme:AcmeComponent/> |
| </s:Application></pre> |
| |
| <p>You are not required to include all namespaces that you define |
| as target namespaces. You can define multiple namespaces, but use |
| only one target namespace. You might do this if some components |
| use other components that are not directly exposed as MXML tags. |
| You cannot then directly access the components in the unused namespace, |
| however. </p> |
| |
| <p>The following command line example defines two namespaces, http://acme2009 and |
| http://mynamespace, but only includes one as a namespace target:</p> |
| |
| <pre class="codeblock"> compc -source-path . |
| -output c:/jrun4/servers/flex/flex/WEB-INF/flex/user_classes/MyButtons.swc |
| -namespace http://acme2009 AcmeManifest.xml |
| -namespace http://mynamespace SimpleManifest.xml |
| -include-namespaces http://mynamespace</pre> |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fd8_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fd8_verapache"><!-- --></a> |
| <h3 class="topictitle3">Adding utility classes</h3> |
| |
| |
| <div> |
| <p> |
| |
| |
| |
| You can add any classes that you want to |
| use in your applications to a SWC file. These classes do not have |
| to be components, but are often files that components use. They |
| are classes that might be used at run time and, therefore, are not checked |
| by the compiler. For example, your components might use a library |
| of classes that perform mathematical functions, or use a custom |
| logging utility. This documentation refers to these classes as <em>utility classes</em>. |
| Utility classes are not exposed as MXML tags. </p> |
| |
| <p>To add utility classes to a SWC file, you use the <samp class="codeph">include-sources</samp> option. |
| This option lets you specify a path to a class file rather than |
| the class name, or specify an entire directory of classes. </p> |
| |
| <p>The following command-line example adds the FV_calc.as and FV_format.as utility |
| classes to the SWC file:</p> |
| |
| <pre class="codeblock"> compc -source-path . |
| -output c:/jrun4/servers/flex/WEB-INF/flex/user_classes/MySwc.swc |
| -include-sources FV_classes/FV_format.as FV_classes/FV_calc.as |
| -include-classes asbutton.MyButton</pre> |
| |
| <p>In a configuration file, these options appear as the following |
| example shows:</p> |
| |
| <pre class="codeblock"> <compiler> |
| <source-path> |
| <path-element>.</path-element> |
| </source-path> |
| <output>c:/jrun4/servers/flex/flex/WEB-INF/flex/user_classes/ MySwc.swc</output> |
| </compiler> |
| <include-classes> |
| <class>asbutton.MyButton</class> |
| </include-classes> |
| <include-sources> |
| <path-element>FV_classes/FV_format.as</path-element> |
| <path-element>FV_classes/FV_calc.as</path-element> |
| <include-sources></pre> |
| |
| <p>When specifying files with the <samp class="codeph">include-sources</samp> option, |
| you must give the full filename (for example, FV_calc.as instead |
| of FV_calc) because the file is not a component. If you use this |
| option to include MXML components that are in a non-default package, |
| you must include the source folder in the source path.</p> |
| |
| <p>You can also provide a directory name to the <samp class="codeph">include-sources</samp> option. |
| In this case, the compiler includes all files with an MXML or AS |
| extension, and ignores all other files.</p> |
| |
| <p>Classes that you add with the <samp class="codeph">include-sources</samp> option |
| can be accessed from the generic namespace in your applications. |
| To use them, you need to add the following code in your application |
| tag:</p> |
| |
| <pre class="codeblock"> xmlns:local="*"</pre> |
| |
| <p>You can then use them as tags; for example:</p> |
| |
| <pre class="codeblock"> <local:FV_calc id="calc" rate=".0125" nper="12" pmt="100" pv="0" type="1"/></pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7ac6_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7ac6_verapache"><!-- --></a> |
| <h3 class="topictitle3">Adding nonsource classes</h3> |
| |
| |
| <div> |
| <p>You often include noncompiled (or nonsource) files with |
| your applications. A <em>nonsource</em> file is a class or resource |
| (such as a style sheet or graphic) that is not compiled but is included |
| in the SWC file for other classes to use. For example, a font file |
| that you embed or a set of images that you use as graphical skins |
| in a component’s style sheet should not be compiled but should be |
| included in the SWC file. These are classes that you typically do |
| not use the <samp class="codeph">[Embed]</samp> syntax to link in to your application.</p> |
| |
| <p>Use the <samp class="codeph">include-file</samp> option to define nonsource |
| files in a SWC file. </p> |
| |
| <p>The syntax for the <samp class="codeph">include-file</samp> option is as |
| follows:</p> |
| |
| <pre class="codeblock"> <em>-include-file name path</em> </pre> |
| |
| <p>The <em>name</em> argument is the name used to reference the embedded |
| file in your applications. The <em>path</em> argument is the current |
| path to the file in the file system.</p> |
| |
| <p>When you use the <samp class="codeph">include-file</samp> option, you specify |
| both a name and a filepath, as the following example shows:</p> |
| |
| <pre class="codeblock"> compc -include-file logo.gif c:/images/logo/logo1.gif ...</pre> |
| |
| <p>In a configuration file, these options appear as the following |
| example shows:</p> |
| |
| <pre class="codeblock"> <compiler> |
| <output>c:/jrun4/servers/flex/flex/WEB-INF/flex/user_classes/Combo.swc</output> |
| </compiler> |
| <include-file> |
| <name>logo.gif</name> |
| <path>c:/images/logo/logo1.gif</path> |
| </include-file> |
| <include-classes> |
| <class>asbutton.MyButton</class> |
| <include-classes></pre> |
| |
| <p>Each name that you assign to a resource must be unique because |
| the name becomes a global variable.</p> |
| |
| <p>You cannot specify a list of files with the <samp class="codeph">include-file</samp> option. |
| So, you must add a separate <samp class="codeph">include-file</samp> option |
| for each file that you include, as the following command-line example |
| shows:</p> |
| |
| <pre class="codeblock"> compc -include-file file1.jpg ../images/file1.jpg -include-file file2.jpg ../images/file2.jpg -- -output MyFile.swc</pre> |
| |
| <p>If you want to add many resources to the SWC file, consider using |
| a configuration file rather than listing all the resources on the |
| command line. For an example of a configuration file that includes |
| multiple resources in a SWC file, see <a href="flx_styles_st.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fee_verapache">Styles |
| and themes</a>.</p> |
| |
| <p>In general, specify a file extension for files that you include |
| with the <samp class="codeph">include-file</samp> option. In some cases, omitting |
| the file extension can lead to a loss of functionality. For example, |
| if you include a CSS file in a theme SWC file, you must set the |
| name to be *.css. When Flex examines the SWC file, it applies all |
| CSS files in that SWC file to the application. CSS files without |
| the CSS extension are ignored.</p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fd6_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fd6_verapache"><!-- --></a> |
| <h3 class="topictitle3">Creating themes</h3> |
| |
| |
| <div> |
| <p> |
| You can |
| use the <samp class="codeph">include-file</samp> and <samp class="codeph">include-classes</samp> options |
| to add skin files and style sheets to a SWC file. The SWC file can |
| then be used as a theme. For more information about using themes |
| in applications, see <a href="flx_styles_st.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fee_verapache">Styles |
| and themes</a>.</p> |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested1" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fd5_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fd5_verapache"><!-- --></a> |
| <h2 class="topictitle2">Viewing errors and warnings</h2> |
| |
| |
| <div> |
| <p> |
| |
| You |
| can use the compiler options to specify what level of warnings and |
| errors to view. Also, you can set levels of logging with the compiler |
| options.</p> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf69084-7eaf_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7eaf_verapache"><!-- --></a> |
| <h3 class="topictitle3">Viewing warnings and errors</h3> |
| |
| |
| <div> |
| <p> |
| There |
| are several options that let you customize the level of warnings |
| and errors that are displayed by the Flex compilers, including the |
| following:</p> |
| |
| <ul> |
| <li> |
| <p> |
| <samp class="codeph">show-actionscript-warnings</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">show-binding-warnings</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">show-invalid-css-property-warnings</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">show-shadowed-device-font-warnings</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">show-unused-type-selector-warnings</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">strict</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">warnings</samp> |
| </p> |
| |
| </li> |
| |
| </ul> |
| |
| <p>To disable all warnings, set the <samp class="codeph">warnings</samp> option |
| to <samp class="codeph">false</samp>.</p> |
| |
| <p>The <samp class="codeph">show-actionscript-warnings</samp> option displays |
| compiler warnings for the following situations:</p> |
| |
| <ol> |
| <li> |
| <p>Situations that are probably not what the developer intended, |
| but are still legal; for example:</p> |
| |
| <pre class="codeblock"> if (a = 10) // Did you really want '==' instead of '='? |
| if (b == NaN) // Any comparison with NaN is always false. |
| var b; // Missing type declaration.</pre> |
| |
| </li> |
| |
| <li> |
| <p>Usage of deprecated or removed ActionScript 2.0 APIs.</p> |
| |
| </li> |
| |
| <li> |
| <p>Situations where APIs behave differently in ActionScript |
| 2.0 than in ActionScript 3.0.</p> |
| |
| </li> |
| |
| </ol> |
| |
| <p>You can customize the types of warnings displayed by using options |
| that begin with <em>warn</em> (for example, <samp class="codeph">warn-constructor-return-values</samp> and <samp class="codeph">warn-bad-type-cast</samp>). |
| A complete list of warnings are available in the advanced command-line |
| help or in the flex-config.xml file.</p> |
| |
| <p>The <samp class="codeph">strict</samp> option enforces typing and reports |
| run-time verifier errors at compile time. This option assumes that |
| definitions are not dynamically redefined at run time, so these |
| checks can be made at compile time. It displays errors for conditions |
| such as undefined references, const and private violations, argument mismatches, |
| and type checking.</p> |
| |
| <p>The <samp class="codeph">show-binding-warnings</samp> option displays warnings |
| when Flash Player cannot detect changes to bound properties.</p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fd3_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fd3_verapache"><!-- --></a> |
| <h3 class="topictitle3">About deprecation</h3> |
| |
| |
| <div> |
| <p> |
| In some |
| cases, Flex functionality has been deprecated. Deprecated features |
| and properties have the following characteristics: </p> |
| |
| <ul> |
| <li> |
| <p>Generate compiler warnings.</p> |
| |
| </li> |
| |
| <li> |
| <p>Continue to work in Flex 4.x. </p> |
| |
| </li> |
| |
| <li> |
| <p>Will be removed from the product in a future major release.</p> |
| |
| </li> |
| |
| </ul> |
| |
| <p>The command-line compilers report deprecation warnings by default. |
| You can suppress deprecation warnings by setting the <samp class="codeph">show-deprecation-warnings</samp> option |
| to <samp class="codeph">false</samp>.</p> |
| |
| <p>In some cases, deprecated functionality does not work as expected |
| unless you instruct the compiler to use an earlier version of the |
| compiler with the <samp class="codeph">compatibility-version</samp> compiler |
| argument. For example, to use functionality that was deprecated |
| since Flex 3, you could use the following command-line compiler |
| argument:</p> |
| |
| <pre class="codeblock"> -compatibility-version=3.0.0</pre> |
| |
| <p>Possible values for this compiler argument are defined as constants |
| in the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/FlexVersion.html" target="_blank">FlexVersion</a> class. |
| For more information on using this compiler argument, see <a href="flx_versioning_ve.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ede_verapache">Backward |
| compatibility</a>.</p> |
| |
| <p>You can use the <samp class="codeph">[Deprecated]</samp> metadata tag to |
| deprecate your own classes and class elements. For more information, |
| see <a href="flx_metadata_me.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a6c_verapache">Deprecated |
| metadata tag</a>.</p> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fd2_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fd2_verapache"><!-- --></a> |
| <h3 class="topictitle3">About logging</h3> |
| |
| |
| <div> |
| <p> |
| Errors and |
| warnings are reported differently, depending on which compiler you are |
| using. </p> |
| |
| <p>The mxmlc and compc command-line compilers send error and warning messages |
| to the standard output. You can redirect this output by using the redirector |
| (>).</p> |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested1" id="WS2db454920e96a9e51e63e3d11c0bf69084-7fd3_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7fd3_verapache"><!-- --></a> |
| <h2 class="topictitle2">About SWC files</h2> |
| |
| |
| <div> |
| <p> |
| |
| |
| |
| A <em>SWC</em> file is an archive file, |
| sometimes also referred to as a class library, for components and |
| other assets. SWC files contain a SWF file and a catalog.xml file, in |
| addition to properties files and other uncompiled assets such as |
| CSS files. The SWF file implements the compiled component or group |
| of components and includes embedded resources as symbols. An application |
| extracts the SWF file from a SWC file. It uses the SWF file’s contents |
| when the application refers to resources in that SWC file. The catalog.xml |
| file lists of the contents of the component package and its individual |
| components.</p> |
| |
| <p>In most cases, the symbols defined in the SWF file that are referenced |
| by the application are embedded in the application at compile-time. |
| This is known as static linking. The application compiler only includes |
| those classes that are used by your application, and dependent classes, |
| in the final SWF file.</p> |
| |
| <p> |
| You can also |
| dynamically link the contents of SWC files. Dynamic linking is when the |
| entire SWF file is loaded at run time. To achieve dynamic linking |
| of the SWF file, you must use the SWC file as a Runtime Shared Library, |
| or RSL. For more information, see <a href="flx_rsl_rsl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd1_verapache">Runtime |
| Shared Libraries</a>.</p> |
| |
| <p> |
| |
| |
| |
| |
| SWC files make it easy to exchange components |
| and other assets among Flex developers. You need only exchange a |
| single file, rather than the MXML or ActionScript files and images |
| and other resource files. The SWF file in a SWC file is compiled, |
| which means that the code is loaded efficiently and it is hidden |
| from casual view. Also, compiling a component as a SWC file can |
| make namespace allocation an easier process.</p> |
| |
| <p>You can package and expand SWC files with tools that support |
| the PKZip archive format, such as WinZip or jar. However, do not |
| manually change the contents of a SWC file, and do not try to run |
| the SWF file that is in a SWC file in Flash Player.</p> |
| |
| <p>You typically create SWC files by using compc, the command-line |
| component compiler. </p> |
| |
| <p>You can also save SWC files as open directories rather than archived |
| files. This gives you easier access to the contents of the SWC file. |
| You create an open directory SWC by setting the <samp class="codeph">directory</samp> option |
| to <samp class="codeph">true</samp>. This is typically only used when you create |
| a custom RSL because RSLs require that you deploy the SWF file with |
| your application. </p> |
| |
| <p>The properties files inside SWC files are uncompiled text files |
| in UTF-8 format. They are used as resource bundles for localization |
| of applications. Within the SWC file, they are stored in the /locale/<em>locale_string</em> directory, |
| where <samp class="codeph">locale_string</samp> is something like en_US or |
| fr_FR. For more information, see <a href="flx_l10n_ln.html#WS19f279b149e7481c-1c03f02c12bd00c4763-8000_verapache">Localization</a>.</p> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fd0_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fd0_verapache"><!-- --></a> |
| <h3 class="topictitle3">Distributing SWC files</h3> |
| |
| |
| <div> |
| <p> |
| |
| After you generate a SWC file, |
| you can use it in your applications. </p> |
| |
| <p>You can also copy SWC files to a directory specified by the <samp class="codeph">library-path</samp> compiler |
| option. You must store SWC files at the top level of the user_classes directory |
| or the directory specified by the <samp class="codeph">library-path</samp>. |
| You cannot store SWC files in subdirectories. </p> |
| |
| <p> |
| |
| To use a SWC file when compiling |
| components or applications from the command line, you specify the |
| location of the SWC file with the <samp class="codeph">library-path</samp> compiler |
| option.</p> |
| |
| <div class="note"><span class="notetitle">Note:</span> Do not store custom components or classes in |
| the flex_root/WEB-INF/flex/libs directory.</div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fcf_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fcf_verapache"><!-- --></a> |
| <h3 class="topictitle3">Using components in SWC files</h3> |
| |
| |
| <div> |
| <p> |
| |
| If a component in a SWC file does not |
| have a namespace, you can add a generic namespace identifier in |
| your <samp class="codeph"><s:Application></samp> tag to use the component, |
| as the following example shows:</p> |
| |
| <pre class="codeblock"> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:mx="library://ns.adobe.com/flex/mx" |
| xmlns:a="*"></pre> |
| |
| <p>If the component has a package name as part of its namespace, |
| you must do one of the following:</p> |
| |
| <ol> |
| <li> |
| <p>Add the package name to the namespace declaration in |
| the <samp class="codeph"><s:Application></samp> tag; for example:</p> |
| |
| <pre class="codeblock"> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:mx="library://ns.adobe.com/flex/mx" |
| xmlns:but="mycomponents.*"></pre> |
| |
| </li> |
| |
| <li> |
| <p>Create a manifest file and recompile the SWC file. You pass |
| the manifest file to the compc compiler by using the <samp class="codeph">namespace</samp> option. |
| In the <samp class="codeph"><s:Application></samp> tag, you specify only |
| the unique namespace URI that you used with compc. For more information |
| on specifying a namespace for the component, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7a68_verapache">Compiling |
| components using namespaces</a>.</p> |
| |
| </li> |
| |
| </ol> |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested1" id="WS2db454920e96a9e51e63e3d11c0bf69084-7aa8_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf69084-7aa8_verapache"><!-- --></a> |
| <h2 class="topictitle2">About manifest files</h2> |
| |
| |
| <div> |
| <p> |
| |
| Manifest files map a component namespace to |
| class names. They define the package names that the components used |
| before being compiled into a SWC file. They are not required when |
| compiling SWC files, but they can help keep your source files organized.</p> |
| |
| <p>Manifest files use the following syntax:</p> |
| |
| <pre class="codeblock"> <?xml version="1.0"?> |
| <componentPackage> |
| <component id="<em>component_name</em>" class="<em>component_class</em>"/> |
| [...] |
| </componentPackage></pre> |
| |
| <p>For example:</p> |
| |
| <pre class="codeblock"> <?xml version="1.0"?> |
| <componentPackage> |
| <component id="MyButton" class="package1.MyButton"/> |
| <component id="MyOtherButton" class="package2.MyOtherButton"/> |
| </componentPackage></pre> |
| |
| <p>In a manifest file, the <samp class="codeph">id</samp> property of each <samp class="codeph"><component></samp> tag |
| must be unique. It is the name you use for the tag in your applications. |
| For example, you define the <samp class="codeph">id</samp> as <samp class="codeph">MyButton</samp> in |
| the manifest file:</p> |
| |
| <pre class="codeblock"> <component id="MyButton" class="asbutton.MyButton"/></pre> |
| |
| <p>In your application, you use <samp class="codeph">MyButton</samp> as the |
| tag name:</p> |
| |
| <pre class="codeblock"> <local:MyButton label="Click Me"/></pre> |
| |
| <p>The <samp class="codeph">id</samp> property in the manifest file entry is |
| optional. If you omit it, you can use the class name as the tag. |
| This is useful if you have two classes with the same name in different |
| packages. In this case, you use the manifest to define the tags, as |
| the following example shows:</p> |
| |
| <pre class="codeblock"> <?xml version="1.0"?> |
| <componentPackage> |
| <component id="BoringButton" class="boring.MyButton"/> |
| <component id="GreatButton" class="great.MyButton"/> |
| </componentPackage></pre> |
| |
| <p> |
| |
| |
| Some |
| SWC files consist of multiple components from different packages, |
| so compc includes a manifest file with your SWC file in those cases |
| to prevent compiler errors.</p> |
| |
| <p>When compiling the SWC file, you specify the manifest file by |
| using the <samp class="codeph">namespace</samp> and the <samp class="codeph">include-namespaces</samp> options. |
| You define the namespace and its contents with the namespace option:</p> |
| |
| <pre class="codeblock"> -namespace http://mynamespace mymanifest.xml</pre> |
| |
| <p>Then you identify that namespace’s contents for inclusion in |
| the SWC file:</p> |
| |
| <pre class="codeblock"> -include-namespaces http://mynamespace</pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested1" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fcd_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fcd_verapache"><!-- --></a> |
| <h2 class="topictitle2">Using fcsh, the Flex compiler shell</h2> |
| |
| |
| <div> |
| <p>The fcsh (Flex Compiler Shell) utility provides a shell |
| environment that you use to compile applications, modules, and component |
| libraries. It works very similarly to the mxmlc and compc command |
| line compilers, but it compiles faster than the mxmlc and compc |
| command-line compilers. One reason is that by keeping everything |
| in memory, fcsh eliminates the overhead of launching the JVM and loading |
| the compiler classes. Another reason is that compilation results |
| (for example, type information) can be kept in memory for subsequent |
| compilations. </p> |
| |
| <p>This utility is intended to improve the experience of users of |
| the command-line compilers. </p> |
| |
| <p>For simple applications, fcsh might not be necessary. But for |
| more complex applications that you compile frequently, you should |
| experience a significant performance improvement over using the |
| mxmlc and compc command-line compilers. </p> |
| |
| <p>When you first compile an application with fcsh, you will not |
| typically notice any difference in speed between the fcsh and the |
| command-line compilers. This is because fcsh must load the application |
| model and custom libraries into memory, just as the command-line |
| compilers would. After that, however, each subsequent compilation |
| uses the libraries in memory to compile. This reduces the amount |
| of disk access that the compilers need to perform and should result |
| in shorter compile times. </p> |
| |
| <p>The fcsh tool is in the bin directory. For Unix and Mac OS, it |
| is a shell script called fcsh. For Windows, it is fcsh.exe. You |
| invoke it only from the command line. The Java settings are managed |
| by the jvm.config file in the bin directory.</p> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fcc_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fcc_verapache"><!-- --></a> |
| <h3 class="topictitle3">Using fcsh </h3> |
| |
| |
| <div> |
| <p>You invoke fcsh from the command line. You can launch the |
| utility either as an executable (Windows) or shell command (Unix/Linux/Mac). </p> |
| |
| <ol> |
| <li> |
| <p>Open a command prompt. </p> |
| |
| </li> |
| |
| <li> |
| <p>Navigate to the {<em>SDK_root</em>}/bin directory. </p> |
| |
| </li> |
| |
| <li> |
| <p>Enter <samp class="codeph">fcsh</samp> at the command line. Your commands |
| will now be executed within the fcsh environment. You will know |
| this if your command prompt becomes <samp class="codeph">(fcsh)</samp>.</p> |
| |
| </li> |
| |
| </ol> |
| |
| <p>Typically, you compile a simple application when you first launch |
| fcsh; for example: </p> |
| |
| <pre class="codeblock"> (fcsh) mxmlc c:/myfiles/MyApp.mxml</pre> |
| |
| <p>The fcsh utility returns a target id: </p> |
| |
| <pre class="codeblock"> fcsh: Assigned 1 as the compile target id.</pre> |
| |
| <p>You can then refer to the target ids when using subsequent commands |
| inside the fcsh utility. For example, to compile the previous application |
| with incremental compilation: </p> |
| |
| <pre class="codeblock"> (fcsh) compile 1</pre> |
| |
| <p>You can enter <samp class="codeph">help</samp> in the fcsh shell to see |
| a list of available options; for example: </p> |
| |
| <pre class="codeblock"> (fcsh) help</pre> |
| |
| <p>You can enter <samp class="codeph">quit</samp> in the fcsh shell to exit |
| fcsh and return to the command prompt; for example: </p> |
| |
| <pre class="codeblock"> (fcsh) quit</pre> |
| |
| <p>The following example shows that fcsh dramatically reduces compilation |
| time when compiling the same application multiple times. The first |
| compilation takes 8885 milliseconds. The second takes only 5140 |
| milliseconds: </p> |
| |
| <pre class="codeblock"> (fcsh) mxmlc -benchmark=true flexstore.mxml |
| Total time: 8885ms |
| Peak memory usage: 84 MB (Heap: 58, Non-Heap: 26) |
| (fcsh) mxmlc -benchmark=true flexstore.mxml |
| Total time: 5140ms |
| Peak memory usage: 84 MB (Heap: 57, Non-Heap: 27)</pre> |
| |
| <p>In addition, subsequent <em>full</em> compilations of the same |
| application are much faster, as the following example shows: </p> |
| |
| <pre class="codeblock"> > touch flexstore.mxml |
| |
| (fcsh) compile 1 |
| Files changed: 1 Files affected: 0 |
| Total time: 933ms |
| Peak memory usage: 88 MB (Heap: 62, Non-Heap: 26) |
| flexstore.swf (522456 bytes) |
| Total time: 1102ms |
| Peak memory usage: 77 MB (Heap: 51, Non-Heap: 26) |
| (fcsh)</pre> |
| |
| </div> |
| |
| </div> |
| |
| <div class="nested2" id="WS2db454920e96a9e51e63e3d11c0bf67670-7fcb_verapache"><a name="WS2db454920e96a9e51e63e3d11c0bf67670-7fcb_verapache"><!-- --></a> |
| <h3 class="topictitle3">About fcsh commands </h3> |
| |
| |
| <div> |
| <p>The following table describes the available fcsh commands: </p> |
| |
| |
| <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"> |
| |
| |
| <thead align="left"> |
| <tr> |
| <th class="cellrowborder" valign="top" width="NaN%" id="d107933e7262"> |
| <p>Option</p> |
| |
| </th> |
| |
| <th class="cellrowborder" valign="top" width="NaN%" id="d107933e7268"> |
| <p>Description </p> |
| |
| </th> |
| |
| </tr> |
| |
| </thead> |
| |
| <tbody> |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7262 "> |
| <div class="p"> |
| <pre class="codeblock">clear [<em>id</em>]</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7268 "> |
| <p>Removes the target id(s) from memory but |
| saves the target's *.cache file. If you enter this command without specifying |
| an id argument, fcsh clears all target ids. For information about |
| cache files, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ed3_verapache">About |
| incremental compilation</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7262 "> |
| <div class="p"> |
| <pre class="codeblock">compile <em>id</em></pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7268 "> |
| <p>Uses incremental compilation (without linking) |
| to compile the specified id. This command uses the same arguments |
| used in previous compilations. If you try to compile a target that |
| has not changed, fcsh skips that target. </p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7262 "> |
| <div class="p"> |
| <pre class="codeblock">compc <em>arg1</em> [...]</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7268 "> |
| <p>Compiles SWC files from the specified sources. |
| This command returns a target id that you can then pass to other |
| fcsh options. The target ids are incremented by 1 for each new compilation. |
| If you quit fcsh and then relaunch it, all targets are cleared and |
| the ids start at 1 again. </p> |
| |
| <p>This command takes all the same |
| arguments as the compc command-line compiler. For information about using |
| compc, see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fd2_verapache">Using |
| compc, the component compiler</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7262 "> |
| <p> |
| <samp class="codeph">help</samp> |
| </p> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7268 "> |
| <p>Lists commands. Commands not listed but |
| also supported include <samp class="codeph">cp</samp>, <samp class="codeph">mv</samp>, <samp class="codeph">rm</samp>, |
| and <samp class="codeph">touch</samp>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7262 "> |
| <div class="p"> |
| <pre class="codeblock">info [<em>id</em>]</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7268 "> |
| <p>Displays compiler target information such |
| as the source files and cache file name. If you do not specify a target |
| id, fcsh prints information for all targets in reverse id order. </p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7262 "> |
| <div class="p"> |
| <pre class="codeblock">mxmlc <em>arg1</em> [...]</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7268 "> |
| <p>Compiles and optimizes the target application |
| or module using the mxmlc command-line compiler. This command returns |
| a target id that you can then pass to other fcsh options. The target |
| ids are incremented by 1 for each new compilation. If you quit fcsh |
| and then relaunch it, all targets are cleared and the ids start at |
| 1 again. </p> |
| |
| <p>This command takes all the same arguments as the |
| mxmlc command-line compiler. For information about using mxmlc, |
| see <a href="flx_compilers_cpl.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fcc_verapache">Using |
| mxmlc, the application compiler</a>.</p> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7262 "> |
| <div class="p"> |
| <pre class="codeblock">quit</pre> |
| |
| </div> |
| |
| </td> |
| |
| <td class="cellrowborder" valign="top" width="NaN%" headers="d107933e7268 "> |
| <p>Exits the fcsh utility. All data stored |
| in memory is destroyed. When you relaunch fcsh, you cannot access |
| targets that you created in a previous session. </p> |
| |
| </td> |
| |
| </tr> |
| |
| </tbody> |
| |
| </table> |
| </div> |
| |
| <div class="p">The fcsh tool also supports the following commands:<ul> |
| <li> |
| <p> |
| <samp class="codeph">cp</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">mv</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">rm</samp> |
| </p> |
| |
| </li> |
| |
| <li> |
| <p> |
| <samp class="codeph">touch</samp> |
| </p> |
| |
| </li> |
| |
| </ul> |
| |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <p>Adobe, Adobe Flash, Adobe Flash Player, and Adobe LiveCycle Data Services ES are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries and are used by permission from Adobe. No other license to the Adobe trademarks are granted.</p> |
| </div> |
| |
| |
| </body> |
| </html> |