Specifications

286
CHAPTER 14
Using multiple SDKs
Flex Builder lets you change the version of the SDK that you use to compile your projects. You can select the SDK
when you first create a project, or at any time you are working on a project. You can change the SDK for any type
of Flex project, including library projects and ActionScript-only projects.
When you change the SDK, Flex Builder rebuilds your application and flags any code that is no longer compatible
with the selected SDK.
Flex Builder includes the Flex 3 and Flex 2.0.1 SDKs. You can also add any SDK you want.
For more information about selecting different SDKs in Flex Builder, see “Using multiple SDKs in Flex Builder”
on page 131 in Using Adobe Flex Builder 3.
Backward compatibility
To specify the version of the Flex compiler and framework that the output should be compatible with, use the
compatibility-version compiler option. 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. Setting the
compatibility version does not enforce all differences that exist between the versions. For a list of differences that
are enforced, see “Differences between SDK 2.0.1 and SDK 3” on page 287.
The currently supported values for the
compatibility-version compiler option are 2.0.0 and 2.0.1. If you do
not explicitly set the value of this option, the compiler defaults to the current SDK’s version. You can determine
the current SDK’s version by using the -version option on the command line. For example:
mxmlc -version
In Flex Builder, you add the compatibility-version compiler option to the Additional Compiler Arguments
field on the Flex Compiler properties panel. The following example sets the compatibility version to 2.0.1:
-compatibility-version=2.0.1
For the command-line compilers, you can either pass the compatibility-version compiler option on the
command line or set the value in the configuration file. The following example sets the compatibility version to
2.0.1 in the flex-config.xml file:
<compiler>
<mxml>
<compatibility-version>2.0.1</compatibility-version>
<mxml>
<compiler>