Flex contains configuration file, flex-config.xml, located at "/Applications/Adobe Flash Builder 4/sdks/4.0.0/frameworks/flex-config.xml". The file is used in the compilation phase, and options defined in it are read and applied by the application complier.
You can modify this file, to bring some of its options into play. You also may use separate custom config file, which can be sent to compiler as a parameter.
It is also possible to create local configuration file, placed in the folder containing main application file (AS class, or MXML file). Configuration file must be named the same as application file plus "-config.xml" suffix. Mxmlc automatically searches for a local configuration file in that folder.:

Configuration files will be read in the following priority (highest first):

  1. Options set in the command line have precedence over all other configuration files options;
  2. Options from custom configuration file, specified by load-config compiler option, have precedence over local configuration file;
  3. Local configuration file has higher priority than flex-config.xml file;
  4. flex-config.xml file has the lowest priority.

Flex 4 framework config file listed below to show basic configuration-file structure:

< ?xml version="1.0"?>

<!--

	ADOBE SYSTEMS INCORPORATED
	Copyright 2005-2007 Adobe Systems Incorporated
	All Rights Reserved.

	NOTICE: Adobe permits you to use, modify, and distribute this file
	in accordance with the terms of the license agreement accompanying it.

-->

<flex -config>
    <!-- Specifies the minimum player version that will run the compiled SWF. -->
   <target -player>10.0.0</target>

   <compiler>

      <!-- Turn on generation of accessible SWFs. -->
      <accessible>true</accessible>

      <!-- Specifies the locales for internationalization. -->
      <locale>
          </locale><locale -element>en_US</locale>
      

      <!-- List of path elements that form the roots of ActionScript class hierarchies. -->
      <!-- not set -->
      <!--
      <source-path>
         <path -element>string</path>
      
      -->

     <!-- Allow the source-path to have path-elements which contain other path-elements -->
     <allow -source-path-overlap>false</allow>

      <!-- Run the AS3 compiler in a mode that detects legal but potentially incorrect -->
      <!-- code.                                                                       -->
      <show -actionscript-warnings>true</show>

      <!-- Turn on generation of debuggable SWFs. False by default for mxmlc, -->
      <!-- but true by default for compc. -->
      <!--
      <debug>true
      -->

      <!-- List of SWC files or directories to compile against but to omit from -->
      <!-- linking.                                                             -->
      <external -library-path>
          <path -element>libs/player/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}/playerglobal.swc</path>
      </external>

      <!-- Turn on writing of generated/*.as files to disk. These files are generated by -->
      <!-- the compiler during mxml translation and are helpful with understanding and   -->
      <!-- debugging Flex applications.                                                  -->
      <keep -generated-actionscript>false</keep>

      <!-- not set -->
      <!--
      <include-libraries>
         <library>string</library>
      
      -->

      <!-- List of SWC files or directories that contain SWC files. -->
      <library -path>
         <path -element>libs</path>
         <path -element>libs/player</path>
         <path -element>libs/player/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}</path>
         <path -element>locale/{locale}</path>
      </library>

      <namespaces>
      <!-- Specify a URI to associate with a manifest of components for use as MXML -->
      <!-- elements.                                                                -->
         <namespace>
            <uri>http://ns.adobe.com/mxml/2009</uri>
            <manifest>mxml-2009-manifest.xml</manifest>
         </namespace>
         <namespace>
            <uri>library://ns.adobe.com/flex/spark</uri>
            <manifest>spark-manifest.xml</manifest>
         </namespace>
         <namespace>
            <uri>library://ns.adobe.com/flex/mx</uri>
            <manifest>mx-manifest.xml</manifest>
         </namespace>
         <namespace>
            <uri>http://www.adobe.com/2006/mxml</uri>
            <manifest>mxml-manifest.xml</manifest>
         </namespace>
      </namespaces>

      <!-- Enable post-link SWF optimization. -->
      <optimize>true</optimize>

      <!-- Enable trace statement omission. -->
      <omit -trace-statements>true</omit>

      <!-- Keep the following AS3 metadata in the bytecodes.                                             -->
      <!-- Warning: For the data binding feature in the Flex framework to work properly,                 -->
      <!--          the following metadata must be kept:                                                 -->
      <!--          1. Bindable                                                                          -->
      <!--          2. Managed                                                                           -->
      <!--          3. ChangeEvent                                                                       -->
      <!--          4. NonCommittingChangeEvent                                                          -->
      <!--          5. Transient                                                                         -->
      <!--
      <keep-as3-metadata>
          <name>Bindable</name>
          <name>Managed</name>
          <name>ChangeEvent</name>
          <name>NonCommittingChangeEvent</name>
          <name>Transient</name>
      
      -->

      <!-- Turn on reporting of data binding warnings. For example: Warning: Data binding -->
      <!-- will not be able to detect assignments to "foo".                               -->
      <show -binding-warnings>true</show>

      <!-- toggle whether warnings generated from unused type selectors are displayed -->
      <show -unused-type-selector-warnings>true</show>

      <!-- Run the AS3 compiler in strict error checking mode. -->
      <strict>true</strict>

      <!-- Use the ActionScript 3 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 -->
      <!-- (-strict is recommended, but not required, for earlier errors) -->
      <as3>true</as3>

      <!-- 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 (-strict is allowed, but may result in compiler errors for         -->
      <!-- references to dynamic properties) -->
      <es>false</es>

      <!-- List of CSS or SWC files to apply as a theme. -->
      <theme>
         <!-- The Flex 4 default theme is Spark. -->
         <filename>themes/Spark/spark.css</filename>
      </theme>

      <!-- Turns on the display of stack traces for uncaught runtime errors. -->
      <verbose -stacktraces>false</verbose>

      <!-- Defines the AS3 file encoding. -->
      <!-- not set -->
      <!--
      <actionscript-file-encoding>
      -->

      <fonts>

          <!-- Enables advanced anti-aliasing for embedded fonts, which provides greater clarity for small -->
          <!-- fonts. This setting can be overriden in CSS for specific fonts. -->
          <!-- NOTE: flash-type has been deprecated. Please use advanced-anti-aliasing <flash-type>true -->
          <advanced -anti-aliasing>true</advanced>

          <!-- The number of embedded font faces that are cached. -->
          <max -cached-fonts>20</max>

          <!-- The number of character glyph outlines to cache for each font face. -->
          <max -glyphs-per-face>1000</max>

          <!-- Defines ranges that can be used across multiple font-face declarations. -->
          <!-- See flash-unicode-table.xml for more examples. -->
          <!-- not set -->
          <!--
          <languages>
              <language -range>
                  <lang>englishRange</lang>
                  <range>U+0020-007E</range>
              </language>
          
          -->

          <!-- Compiler font manager classes, in policy resolution order-->
          <managers>
              <manager -class>flash.fonts.JREFontManager</manager>
              <manager -class>flash.fonts.BatikFontManager</manager>
              <manager -class>flash.fonts.AFEFontManager</manager>
              <manager -class>flash.fonts.CFFFontManager</manager>
          </managers>

          <!-- File containing cached system font licensing information produced via
               java -cp mxmlc.jar flex2.tools.FontSnapshot (fontpath)
               Will default to winFonts.ser on Windows XP and
               macFonts.ser on Mac OS X, so is commented out by default.

          <local-fonts-snapshot>localFonts.ser
          -->

      </fonts>

      <!-- Array.toString() format has changed. -->
      <warn -array-tostring-changes>false</warn>

      <!-- Assignment within conditional. -->
      <warn -assignment-within-conditional>true</warn>

      <!-- Possibly invalid Array cast operation. -->
      <warn -bad-array-cast>true</warn>

      <!-- Non-Boolean value used where a Boolean value was expected. -->
      <warn -bad-bool-assignment>true</warn>

      <!-- Invalid Date cast operation. -->
      <warn -bad-date-cast>true</warn>

      <!-- Unknown method. -->
      <warn -bad-es3-type-method>true</warn>

      <!-- Unknown property. -->
      <warn -bad-es3-type-prop>true</warn>

      <!-- Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN. -->
      <warn -bad-nan-comparison>true</warn>

      <!-- Impossible assignment to null. -->
      <warn -bad-null-assignment>true</warn>

      <!-- Illogical comparison with null. -->
      <warn -bad-null-comparison>true</warn>

      <!-- Illogical comparison with undefined. Only untyped variables (or variables of type *) can be undefined. -->
      <warn -bad-undefined-comparison>true</warn>

      <!-- Boolean() with no arguments returns false in ActionScript 3.0. Boolean() returned undefined in ActionScript 2.0. -->
      <warn -boolean-constructor-with-no-args>false</warn>

      <!-- __resolve is no longer supported. -->
      <warn -changes-in-resolve>false</warn>

      <!-- Class is sealed. It cannot have members added to it dynamically. -->
      <warn -class-is-sealed>true</warn>

      <!-- Constant not initialized. -->
      <warn -const-not-initialized>true</warn>

      <!-- Function used in new expression returns a value. Result will be what the -->
      <!-- function returns, rather than a new instance of that function.           -->
      <warn -constructor-returns-value>false</warn>

      <!-- EventHandler was not added as a listener. -->
      <warn -deprecated-event-handler-error>false</warn>

      <!-- Unsupported ActionScript 2.0 function. -->
      <warn -deprecated-function-error>true</warn>

      <!-- Unsupported ActionScript 2.0 property. -->
      <warn -deprecated-property-error>true</warn>

      <!-- More than one argument by the same name. -->
      <warn -duplicate-argument-names>true</warn>

      <!-- Duplicate variable definition -->
      <warn -duplicate-variable-def>true</warn>

      <!-- ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order. -->
      <warn -for-var-in-changes>false</warn>

      <!-- Importing a package by the same name as the current class will hide that class identifier in this scope. -->
      <warn -import-hides-class>true</warn>

      <!-- Use of the instanceof operator. -->
      <warn -instance-of-changes>true</warn>

      <!-- Internal error in compiler. -->
      <warn -internal-error>true</warn>

      <!-- _level is no longer supported. For more information, see the flash.display package. -->
      <warn -level-not-supported>true</warn>

      <!-- Missing namespace declaration (e.g. variable is not defined to be public, private, etc.). -->
      <warn -missing-namespace-decl>true</warn>

      <!-- Negative value will become a large positive value when assigned to a uint data type. -->
      <warn -negative-uint-literal>true</warn>

      <!-- Missing constructor. -->
      <warn -no-constructor>false</warn>

      <!-- The super() statement was not called within the constructor. -->
      <warn -no-explicit-super-call-in-constructor>false</warn>

      <!-- Missing type declaration. -->
      <warn -no-type-decl>true</warn>

      <!-- In ActionScript 3.0, white space is ignored and '' returns 0. Number() returns -->
      <!-- NaN in ActionScript 2.0 when the parameter is '' or contains white space.      -->
      <warn -number-from-string-changes>false</warn>

      <!-- Change in scoping for the this keyword. Class methods extracted from an  -->
      <!-- instance of a class will always resolve this back to that instance. In   -->
      <!-- ActionScript 2.0 this is looked up dynamically based on where the method -->
      <!-- is invoked from.                                                         -->
      <warn -scoping-change-in-this>false</warn>

      <!-- Inefficient use of += on a TextField.-->
      <warn -slow-text-field-addition>true</warn>

      <!-- Possible missing parentheses. -->
      <warn -unlikely-function-value>true</warn>

      <!-- Possible usage of the ActionScript 2.0 XML class. -->
      <warn -xml-class-has-changed>false</warn>

   </compiler>

   <!-- compute-digest: writes a digest to the catalog.xml of a library. Use this when the library will be used as a
                        cross-domain rsl.-->
   <!-- compute-digest usage:
   <compute-digest>boolean
   -->

   <!-- A list of runtime shared library URLs to be loaded before applications start. -->
   <!-- not set -->
   <!--
   <runtime-shared-libraries>
      <url>string</url>
      <url>string</url>
   
   -->
	
	<!-- runtime-shared-library-path: specifies a SWC or directory to link against and an RSL URL to load with optional failover URLs -->
	<!-- TextLayout SWC -->
    <runtime -shared-library-path>
		<path -element>libs/textLayout.swc</path>
		<rsl -url>http://fpdownload.adobe.com/pub/swz/tlf/1.0.0.595/textLayout_1.0.0.595.swz</rsl>
		<policy -file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy>
		<rsl -url>textLayout_1.0.0.595.swz</rsl>
		<policy -file-url></policy>
	</runtime>
    
    <!-- OSMF SWC -->
    <runtime -shared-library-path>
		<path -element>libs/osmf.swc</path>
		<rsl -url>http://fpdownload.adobe.com/pub/swz/flex/4.0.0.14159/osmf_flex.4.0.0.13495.swz</rsl>
		<policy -file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy>
		<rsl -url>osmf_flex.4.0.0.13495.swz</rsl>
		<policy -file-url></policy>
	</runtime>
      
    <!-- Framework SWC -->
	<runtime -shared-library-path>
		<path -element>libs/framework.swc</path>
		<rsl -url>http://fpdownload.adobe.com/pub/swz/flex/4.0.0.14159/framework_4.0.0.14159.swz</rsl>
		<policy -file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy>
		<rsl -url>framework_4.0.0.14159.swz</rsl>
		<policy -file-url></policy>
	</runtime>
   
    <!-- Spark SWC-->
   	<runtime -shared-library-path>
		<path -element>libs/spark.swc</path>
		<rsl -url>http://fpdownload.adobe.com/pub/swz/flex/4.0.0.14159/spark_4.0.0.14159.swz</rsl>
		<policy -file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy>
		<rsl -url>spark_4.0.0.14159.swz</rsl>
		<policy -file-url></policy>
	</runtime>
	
    <!-- Sparkskins SWC-->
   	<runtime -shared-library-path>
		<path -element>libs/sparkskins.swc</path>
		<rsl -url>http://fpdownload.adobe.com/pub/swz/flex/4.0.0.14159/sparkskins_4.0.0.14159.swz</rsl>
		<policy -file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy>
		<rsl -url>sparkskins_4.0.0.14159.swz</rsl>
		<policy -file-url></policy>
	</runtime>
	 
	<!-- RPC SWC -->
	<runtime -shared-library-path>
		<path -element>libs/rpc.swc</path>
		<rsl -url>http://fpdownload.adobe.com/pub/swz/flex/4.0.0.14159/rpc_4.0.0.14159.swz</rsl>
		<policy -file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy>
		<rsl -url>rpc_4.0.0.14159.swz</rsl>
		<policy -file-url></policy>
	</runtime>
    	
	<!-- static-link-runtime-shared-libraries: statically link the libraries specified by the -runtime-shared-libraries-path option.-->
	<static -link-runtime-shared-libraries>false</static>

   <!-- target-player: specifies the version of the player the application is targeting.
                       Features requiring a later version will not be compiled into the application.
                       The minimum value supported is "9.0.0".-->
   <!-- target-player usage:
   <target-player>version
   -->

   <!-- Enables SWFs to access the network. -->
   <use -network>true</use>

   <!-- Metadata added to SWFs via the SWF Metadata tag. -->
   <metadata>
      <title>Adobe Flex 4 Application</title>
      <description>http://www.adobe.com/products/flex</description>
      <publisher>unknown</publisher>
      <creator>unknown</creator>
      <language>EN</language>
   </metadata>

   <!-- licenses: specifies a list of product and serial number pairs. -->
   <!-- not set -->
   <!--
   <licenses>
      <license>
         <product>string</product>
         <serial -number>number</serial>
      </license>
   
   -->

</flex>

The "frameworks/" folder, where flex-config.xml is located, also contains flash-unicode-table.xml file. This file provides a convenient mapping of Unicode table character ranges for use in Flex's configuration file. To define ranges you need to copy copy them from flash-unicode-table.xml to Flex's configuration file.

Comment now!
















Trackbacks