This document should help you write applications against Flex SDK nightly builds which target the Flash Player 10. It is relevant primarily for Flex 3 as the Flex 4 SDK only targets Flash Player 10.
Text in **red** has been updated for FB 3.0.2.
Grab a nightly build from Download Flex 3, dated Wednesday Oct 29, 2008
(3.2 Milestone build), or later. FLEX_SDK
is used hereafter to refer to the directory where you unzipped the sdk.
Before going further, make sure that you have a Flash 10 playerglobal.swc at FLEX_SDK/frameworks/libs/player/10/playerglobal.swc
.
To make all compiles target player 10:
FLEX_SDK/frameworks/flex-config.xml
. Edit <target-player>
, replacing 9.0.115
with 10.0.0
:.
<target-player>10.0.0</target-player>
<external-library-path>
, edit the path-element for playerglobal.swc
, replacing 9
with 10
:.
<external-library-path> <path-element>libs/player/10/playerglobal.swc</path-element> </external-library-path>
<library-path
:.
<library-path> <path-element>libs</path-element> <path-element>libs/player/10</path-element> <path-element>locale/{locale}</path-element> </library-path>
Alternately, if you want to target either Player 9 or Player 10 with the same SDK:
-target-player=10.0.0
to your mxmlc
or compc
calls<external-library-path>
, edit the path-element for playerglobal.swc
, replacing 9
with {targetPlayerMajorVersion}:.
<external-library-path> <path-element>libs/player/{targetPlayerMajorVersion}/playerglobal.swc</path-element> </external-library-path>
<library-path>
:.
<library-path> <path-element>libs</path-element> <path-element>libs/player/{targetPlayerMajorVersion}</path-element> <path-element>locale/{locale}</path-element> </library-path>
Setting --target-player=10.0.0
causes {targetPlayerMajorVersion} to expand to 10
, the major version.
This will change which playerglobal.swc
is selected depending on -target-player
(which defaults to 9.0.115
on the command-line, 9.0.28
in Flex Builder). Note: If you use Flex Builder with these changes, you will lose code-hints for classes in playerglobal.swc
(such as DisplayObject
), because {targetPlayerMajorVersion} confuses FB3's code model. FB4 will handle {targetPlayerMajorVersion} correctly.
You could also leave flex-config.xml
alone and override just the changed values in your own configuration file, that you load with the -load-config
option. You will want to hardcode the changes for 10
; (don't use {targetPlayerMajorVersion}, in order to avoid FB's code-hinting problem). It's left as an exercise for the reader :)
Create a new application project. Edit the project properties:
/Applications/Adobe Flex Builder 3 Plug-in/sdks/3.2.0
).frameworks/libs/player/10
, select playerglobal.swc
.10.0.0
. Alternately, you can override this value for the compiler by adding -target-player=10.0.0
to "Additional commandline arguments", and leaving HTML wrapper alone (note: there's a bug in FB 3.0.2, it will only detect this correctly with an equal-sign, so don't write -target-player 10.0.0
.)If you do not want have to manually configure playerglobal.swc
, follow the directions above for "Command-line Compiler" to: use your own flex-config
, use {targetPlayerMajorVersion} (but you will not get code hinting for classes in playerglobal.swc
), or change the SDK to always target Flash Player 10. In FB 3.0.2, you should be able to use {targetPlayerMajorVersion} and still get code-hinting -- file a bug if you find this is not the case.
Library projects don't have "Require Flash Player version", so there's no direct way to change the target player from project properties.
Take an existing library project, open project properties:
PROJECT_LOCATION/.actionScriptProperties
and search for 9.0.28
, change it to 10.0.0
, save it. In FB 3.0.2 you can override this value for the compiler by adding -target-player=10.0.0
to "Additional commandline arguments", and leaving the property file alone (note: there's a bug in FB 3.0.2, it will only detect this correctly with an equal-sign, so don't write -target-player 10.0.0
.)/Applications/Adobe Flex Builder 3 Plug-in/sdks/3.0.0
).frameworks/libs/player/10
, select playerglobal.swc
.
Wiki: Downloads
Wiki: Using Flex 3 Builds in Flex Builder
Wiki: Using Gumbo Builds in Flex Builder
Wiki: downloads