Targeting Flash Player 10 (UPDATED for FB 3.0.2)
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.
First Things First
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.
Command-line Compiler
To make all compiles target player 10:
- Modify FLEX_SDK/frameworks/flex-config.xml. Edit <target-player>, replacing 9.0.115 with 10.0.0:
- In <external-library-path>, edit the path-element for playerglobal.swc, replacing 9 with 10:
- Do the same with <library-path:
Alternately, if you want to target either Player 9 or Player 10 with the same SDK:
- Add -target-player=10.0.0 to your mxmlc or compc calls
- In <external-library-path>, edit the path-element for playerglobal.swc, replacing 9 with {targetPlayerMajorVersion}:
- Do the same with <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 
Flex Builder Application Projects
Create a new application project. Edit the project properties:
- Open the "Flex Build Path" tab.
- Expand "Flex 3", select "playerglobal.swc" and click "Remove".
- Note the directory path in "Flex 3 - " (on my system it's /Applications/Adobe Flex Builder 3 Plug-in/sdks/3.2.0).
- Click "Add SWC" and navigate to the that path, and then deeper into frameworks/libs/player/10, select playerglobal.swc.
- Expand "playerglobal.swc", double-click "Link Type" and change it to "External".
- Open the "Flex Compiler" tab
- In "HTML wrapper", change the "Require Flash Player version" to 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.
Flex Builder Library Projects
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:
- Go to the "Info" tab, note the "Location" of your project. Close Flex Builder.
- Edit 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.)
- Reopen Flex Builder, right click on the project and select "Refresh".
- Re-open project properties, and open the "Flex Library Build Path" tab.
- Expand "Flex 3", select "playerglobal.swc" and click "Remove". In FB 3.0.2, you should be able to leave playerglobal.swc alone and use {targetPlayerMajorVersion} and still get code-hinting – file a bug if you find this is not the case.
- Note the directory path in "Flex 3 - " (on my system it's /Applications/Adobe Flex Builder 3 Plug-in/sdks/3.0.0).
- Click "Add SWC" and navigate to the that path, and then deeper into frameworks/libs/player/10, select playerglobal.swc.
- Expand "playerglobal.swc", double-click "Link Type" and change it to "External".
- Finally, go to the "Project" menu, select "Clean..." and "Clean All Projects".
| You must be logged in to comment. |
|

|
Comments (46)
May 15, 2008
Simon Robertson says:
I managed to get Flex Builder setup easily enough to compile SWF files for FP10,...I managed to get Flex Builder setup easily enough to compile SWF files for FP10, and everything is running as expected except for the fact that Flex Builder (the AS editor) doesn't recognise any of the new object properties such as .z .rotationX .rotationY .rotationZ etc, I am having to use hacky fooSprite["rotationX"]=123 markup. Is there anyway to get Flex Builder to recognise the new FP10 specific object properties?
FYI: All of the new classes are being recognised, but not the properties/methods.
Jul 15, 2008
Aaron Alexander says:
same prob here.. why does the "spriteName.z = 200;" cause errors but "spriteName...same prob here.. why does the "spriteName.z = 200;" cause errors but "spriteName["rotationX"] = 200;" doesnt??
how to fix?
Jul 24, 2008
Jono Spiro says:
For now, this is expected behavior. Cheers, JonoFor now, this is expected behavior.
Cheers,
Jono
May 20, 2008
Jason Lewis says:
Yes. Got it compiling in Flex Builder 3 & Mac OS X 10.5. To get rid of 'ab...Yes. Got it compiling in Flex Builder 3 & Mac OS X 10.5.
To get rid of 'abc bytecode decoding failed.' error:
1. Open your project properties
2. Under "Flex Compiler" choose 'Configure Flex SDKs'
3. Add your new Flex 3 nightly build SDK folder to the list.
4. Choose the new Flex SDK as your compiler for this project.
5. Make sure to set HTML Wrapper|'Require Flash Version" to 10.0.0 or Flex will not recognize new FP10 commands.
To Debug in Flex:
1. download player from link Jeff posted: http://opensource.adobe.com/svn/opensource/flex/sdk/branches/3.0.x/in/player/10/
2. Do whatever you need to do in your OS to ensure SWF files are default opened by the new Flash Player 10 debug app
2. Open project properties
3. Goto 'Run/Debug' settings
4. Select your project name & then click 'Edit'
5. URL or Path to launch: Uncheck Use defaults
6. In the 'Debug' field, browse for the actual .SWF file of your project instead of the HTML wrapper.
7. Run debug & tell Flash 'Yes' to try to connect using current version.
8. Flex should launch your application SWF which should open in the new Flash 10 debug player..which will connect to Flex Debugger.
Anyone else have an easier way to debug?
Cheers,
J
Nov 27
nagarjun nagarjuna says:
Currently i am using Flex SDK Version 3.0.0 build 477 and Flex Builder 3 When i ...Currently i am using Flex SDK Version 3.0.0 build 477 and Flex Builder 3
When i try to configure to flash player 10 by following the given steps compiler giving the below errors.
ERROR: Loading configuration file sdks\3.0.0\frameworks\flex-config.xml
playerglobal.swc(flash/display/Graphics): Error: abc bytecode decoding failed.
playerglobal.swc(flash/geom/Matrix3D): Error: abc bytecode decoding failed.
playerglobal.swc(flash/display/BitmapData): Error: abc bytecode decoding failed.
Trying to resolve this issue but no success.
Any help would be Thanks full
Jun 18, 2008
Richard Mayer says:
I can't help but wonder how anybody has ever managed to succesfully compile a Fl...I can't help but wonder how anybody has ever managed to succesfully compile a Flash 10 app from Flex Builder?!?
Downloaded the latest 3.0.2 SDK today and, ok my app compiles, but it wont run because the browser (Firefox 3, Safari 3.1.1 - OSX 10.5.3) claims the necessary Flash Player is not installed.
Turns out that in the html wrapper DetectFlashVer(10, 0, 0) resolves to false, because the function GetSwfVer() (AC_OETags.js) is returning "10.0.b218" and the 'b' is screwing things up.
Edited the function, to filter out not just 'd' and 'r' but also 'b' and now everything works.
Is this an oversight in the SDK? Will it be corrected? Or what did I do wrong? How the heck has anybody anywhere ever managed to compile and run a Flash 10 project, using the default AC_OETags.js file?!?
Jul 16, 2008
Jono Spiro says:
Thanks Richard; I patched this in 3.1.0. In the future, please file a bug in JI...Thanks Richard; I patched this in 3.1.0.
In the future, please file a bug in JIRA so we can get it fixed faster
Jul 07, 2008
Joe Hope says:
Anybody having trouble with the new beta? I have found that it doesn't display m...Anybody having trouble with the new beta? I have found that it doesn't display my 3D objects.
I downloaded the latest nightly build(3.1.0.2312) and followed the instructions above for command-line compiling. No problems when compiling but no 3D. Tried <target-player>10.0.0</target-player>, <target-player>10.0.0.525</target-player> and <target-player>10.0.525</target-player> with same results.
I was able to go back to the first beta and everything works fine. Any ideas what I am missing?
Jul 10, 2008
Evan Kyle says:
I had the same issue after downloading flash player 10 beta 2. It was resolved a...I had the same issue after downloading flash player 10 beta 2. It was resolved after downloading flex_sdk_3.1.0.2418 and rebuilding my sources.
Jul 15, 2008
Jono Spiro says:
Flex SDK 3.1 will have full support for 10 beta 2 (10.0.0.525).Flex SDK 3.1 will have full support for 10 beta 2 (10.0.0.525).
Jul 13, 2008
Aaron Alexander says:
ok, i used the flash uninstaller to get rid of my flash 10 so i could install th...ok, i used the flash uninstaller to get rid of my flash 10 so i could install the flash 10 w/ debugger, but the debugger install pops up an error saying there is a newer version of this software currently installed. I know flash 10 is gone from my system (mac OS X) because i can no longer view the flash 10 demos.
is there a pref file i can manually delete somewhere to get the debugger installed.. its kind of a necessity.
Jul 14, 2008
Aaron Alexander says:
do this (on osX) take the flash 10 debugger.dmg and open it up and then right c...do this (on osX)
take the flash 10 debugger.dmg and open it up and then right click the package(dont install it)
then extract "Archive.bom" somewhere like desktop.. this has the files in it you need
copy "Flash Player.plugin" and also "flashplayer.xpt" to /Library/Internet Plug-Ins/
you should replace the current files
there is also a file "version.txt" that i think was suppose to go in ~/Library/Preferences/Macromedia/ but it doesnt seem to have one to overright.. but this path was in the installer script.. so i dunno.. maybe isnt used anymore.. opening that file with textmate shows the version number to be wrong anyway..
Jul 15, 2008
Jono Spiro says:
If you find this is still a problem, would you please file a bug at https://bugs...If you find this is still a problem, would you please file a bug at https://bugs.adobe.com/jira/browse/FP with the steps you found to fix the problem?
Jul 17, 2008
bond James says:
I have installed the latest nightly build (3.1.0.2511) and everything is working...I have installed the latest nightly build (3.1.0.2511) and everything is working well except that I dont have the graphics and bitmapData library.
does any one have a solution ?
Nov 05, 2008
Luke Lincoln says:
in case anyone else is coming across this problem. This is already logged in JI...in case anyone else is coming across this problem.
This is already logged in JIRA see http://bugs.adobe.com/jira/browse/FB-15787
The work around is simply manually add:
import flash.display.*;
or
import flash.display.BitmapData;
eh voila!
Careful though if you use 'import flash.display.BitmapData;' FB sometimes cleans up your imports and it will dissappear.....
Jul 20, 2008
Aaron Alexander says:
does anyone maintain this post? is there a better place to discuss troubles with...does anyone maintain this post? is there a better place to discuss troubles with flash 10? another adobe forum somewhere that has more steady traffic? the fact i have been messing with the same issues for over a week makes me want to just out off flash 10 because there seems to be 0 supprot for it.
Jul 20, 2008
Matt Chotin says:
This is definitely not the place to ask Player 10 questions. This post is stric...This is definitely not the place to ask Player 10 questions. This post is strictly about getting the SDK to successfully compile to target FP 10. FP10 is in beta, there is no official support for it yet, though there is the Adobe Labs forum
Jul 25, 2008
Petr Cihelka says:
Maybe i have dumb question, but it is possible to use Flash Player 10 features i...Maybe i have dumb question, but it is possible to use Flash Player 10 features in my AIR application.
I have succesfuly integrated lastest Flex SDK (3.0.3.2490) in Flex Builder 3 and instaled Flash Player 10 in my system, but each compiled AIR application using Flash Player 9 (9.0.124, determined by Capabilities.version). Compiled Web Application using Flash Player 10.
(- sorry for my english
-)
Jul 25, 2008
Jono Spiro says:
Not at this time, sorry. JonoNot at this time, sorry.
Aug 08, 2008
Samuel Lorétan says:
Hello, I don't know if this is a limitation of Flex Builder 3 or a misconfigura...Hello,
I don't know if this is a limitation of Flex Builder 3 or a misconfiguration. If this is a bug, I'll fill a JIRA issue as soon as this is confirmed.
I have two projects in a new workspace, using Flex Builder 3 (Plugin version, with Eclipse 3.4.0): MyLibrary (Flex Library Project) and MyProject (ActionScript Project). Both of them are using the Flex SDK 3.2.0 build 2767. The MyProject project uses MyLibrary as a library project defined in its class path.
In the MyLibrary project, I have two classes: the first one doesn't use Vectors (ClassWoVectors), the second one does (ClassWithVector). The project is compiling without any error, and the SWC is properly generated.
In the MyProject projet, I create a new application. When typing the first letters of the classes in my library (says 'Class') and typing Ctrl+Space, there is only one of the two classes appearing: the one without Vectors.
Is this a misconfiguration on my part? Or a bug in Flex Builder and/or the SDK?
Thank you very much.
Aug 11, 2008
Jono Spiro says:
Thanks Samuel – that's a very interesting behavior and we'd like to test i...Thanks Samuel – that's a very interesting behavior and we'd like to test it and see what you're seeing. Would you file a bug against Flex Builder's Code Model (please don't file against Flex SDK)? Give it an important sounding title, vote for it, and if you can... can you create the projects in a way that reproduces this and File|Export them so we can import exactly what you're seeing?
Aug 22, 2008
Samuel Lorétan says:
Bug is filled: https://bugs.adobe.com/jira/browse/FB-13863 A full workspace ...Bug is filled:
https://bugs.adobe.com/jira/browse/FB-13863
A full workspace to reproduce it is attached to the ticket.
Thank you, I hope this bug will be fixed soon, there is no way we can use Flash 10 from our project with our current workflow if it is not.
Aug 25, 2008
Ankur Patel says:
I am also stuck because of the i don't have flashplayer 10's "playerglobal.swc" ...I am also stuck because of the i don't have flashplayer 10's "playerglobal.swc"
so anyboday tell me how can i get that?
Sep 03, 2008
Jono Spiro says:
It's part of the Flex 3.1 SDK in branches, and the Flex 4 trunk on svn: http://o...It's part of the Flex 3.1 SDK in branches, and the Flex 4 trunk on svn: http://opensource.adobe.com/wiki/display/flexsdk/Developer+Documentation
Sep 19, 2008
Maysam Abbasi says:
i have installed nightli sdk 3.2.0.3244 and also installed FP10 i also configure...i have installed nightli sdk 3.2.0.3244 and also installed FP10
i also configured my flex builder 3 and my project settings properly
but i do not know how to use new right to left features by fp10
anuone can help me please?
thank you very much
Oct 22, 2008
Ivan Firsov says:
When i use "playerglobal.swc" from 10, Graphics and BitmapData classes are not a...When i use "playerglobal.swc" from 10, Graphics and BitmapData classes are not available. any ideas?
SDK 3.2.0.3643, 4.0.0.3739
Thanks
Oct 24, 2008
Jono Spiro says:
You mention two SDKs, unavailable in both? You need to be sure you are using "-t...You mention two SDKs, unavailable in both? You need to be sure you are using "-target-player=10", which is the default in 4.
Nov 27
nagarjun nagarjuna says:
Currently i am using Flex SDK Version 3.0.0 build 477 and Flex Builder 3 When i ...Currently i am using Flex SDK Version 3.0.0 build 477 and Flex Builder 3
When i try to configure to flash player 10 by following the given steps compiler giving the below errors.
ERROR: Loading configuration file sdks\3.0.0\frameworks\flex-config.xml
playerglobal.swc(flash/display/Graphics): Error: abc bytecode decoding failed.
playerglobal.swc(flash/geom/Matrix3D): Error: abc bytecode decoding failed.
playerglobal.swc(flash/display/BitmapData): Error: abc bytecode decoding failed.
Trying to resolve this issue but no success.
Any help would be Thanks full
Oct 24, 2008
Jerome Cordiez says:
Is there a way to compile Flash Player 10 content, with SDK >= 3.2, but only ...Is there a way to compile Flash Player 10 content, with SDK >= 3.2, but only require FP9 from the users?
Here's the use case: I would like to use the new FileReference.save method with FP10 users, but offer FP9 users the ability to use the app and save locally using the old approach: save on server first, then download. I don't really want to impose FP10 for that sole reason, as the old approach still works after all
I've changed all SDK settings and my app compiles and runs correctly on both FP9 and 10, but the only way I can get Filereference.save() to work is by requiring FP10 in my html wrapper, which sounds a bit weird? Is there something obvious I'm missing here?
Thanks a lot,
Jerome.
Oct 24, 2008
Jerome Cordiez says:
Forgot to mention that, obviously, the idea here is to differentiate FP9 and 10 ...Forgot to mention that, obviously, the idea here is to differentiate FP9 and 10 users directly in AS using Capabilities.version:
That bit is working just fine, my question is really about the compiler settings to set to be able to compile FP10 content, accessible to FP9 users, if possible?
Cheers,
J.
Oct 24, 2008
Matt Chotin says:
Unfortunately the Player doesn't enable its new APIs in SWFs that target an olde...Unfortunately the Player doesn't enable its new APIs in SWFs that target an older Player. So your SWF will need to target Player 10 in order to leverage those features. One reason we do this is because we don't want to accidentally stomp on methods that customers may have created in their subclasses, etc.
Oct 25, 2008
Jerome Cordiez says:
Hi Matt, thanks for your fast reply. I don't have any problem in "targetting" FP...Hi Matt, thanks for your fast reply.
I don't have any problem in "targetting" FP10, I just want to avoid imposing its detection upfront. So my idea was to compile using SDK 3.2, target FP 10.0.0 (in flex-config.xml), but only ask for FP >= 9.0.0 in the JS version detection script.
But this doesn't seem to work: I've tried many options/combinations, the only one that makes FileReference.save work is when I ask for FP10 in the detection script, which again, seems very strange to me. Shouldn't that work??
Thanks again for the support,
Oct 25, 2008
Matt Chotin says:
Hi Jerome, Unfortunately if your SWF is compiled to target Player 10 it is like...Hi Jerome,
Unfortunately if your SWF is compiled to target Player 10 it is likely not going to run at all in FP9. So you can't have 9 detected in your JS, it has to be 10. Flash Player does not run newer SWFs, it runs SWF targeted at its own version and lower.
Oct 26, 2008
Jerome Cordiez says:
>Flash Player does not run newer SWFs Actually, I'd rather say that it doesn...>Flash Player does not run newer SWFs
Actually, I'd rather say that it doesn't allow for API calls it doesn't understand... But I'd tend to say that if these calls (like FileRefernce.save()) are protected by imposing proper conditions (eg using Capabilities.version), then there shouldn't be any problem, right?
Anyway, I've managed to solve my problem by checking "Require Flash Player version 10.0.0", and hardcoding "var requiredMajorVersion = 9;" in the HTML wrapper, so that is works fine in both FP9 and 10, using FileReference.save if Capabilities.version is >= 10, and resorting to the old "save on server then download" technique for FP9 users...
Now the fact that this works probably means that the "Require Flash Player (...)" option in the HTML wrapper section of the Project properties panel does more than than simply affecting the HTML wrapper, no?
Thanks,
Nov 27
nagarjun nagarjuna says:
Currently i am using Flex SDK Version 3.0.0 build 477 and Flex Builder 3 When i ...Currently i am using Flex SDK Version 3.0.0 build 477 and Flex Builder 3
When i try to configure to flash player 10 by following the given steps compiler giving the below errors.
ERROR: Loading configuration file sdks\3.0.0\frameworks\flex-config.xml
playerglobal.swc(flash/display/Graphics): Error: abc bytecode decoding failed.
playerglobal.swc(flash/geom/Matrix3D): Error: abc bytecode decoding failed.
playerglobal.swc(flash/display/BitmapData): Error: abc bytecode decoding failed.
Trying to resolve this issue but no success.
Any help would be Thanks full
Nov 08, 2008
david kaiser says:
I have an Air application built with Flex Builder. It does things with video. I...I have an Air application built with Flex Builder. It does things with video. I am extending it to work with .f4v files. To work with .f4v I need to be able to get the onXMPData event. To do that I believe I need to target Flash 10 (the NetStream class as described in the Flex 3 AS DOC does not have onXMPData, the NetStream class in the Flash 10 AS DOC does have onXMPData).
What do I need to do? Thanks.
Nov 13, 2008
Atif Farooq says:
I Configured Flex Sdk As Mentioned Above But I am Having This Error In Design Mo...I Configured Flex Sdk As Mentioned Above But I am Having This Error In Design Mode.
"This Component is based on a Component which is not a visual component.Switch to source mode to edit it."
May be there are errors in the this build of flex sdk . i am using
sdk build date : Wed Nov 12, 2008
Or some other problem . what you guys suggest ?
Nov 13, 2008
Matt Chotin says:
What component is it complaining about? It's possible that the last 3.2 builds ...What component is it complaining about? It's possible that the last 3.2 builds of the SDK won't work with the Design View of 3.0.1 (or 3.0.0) and that the 3.0.2 update which is expected next week will fill.
Dec 26, 2008
wang hui says:
hi ! whether the modification above is fit for the AIR application building in f...hi !
whether the modification above is fit for the AIR application building in flex3.2,when I create some 3D effect or animation?
Feb 13, 2009
Alina Kh says:
Hi I have Flex Builder 3 installed on Mac. I have Flex SDK 3.2.0.3958 and 4.0.0....Hi
I have Flex Builder 3 installed on Mac. I have Flex SDK 3.2.0.3958 and 4.0.0.
With 3.2.0.3958 I followed your instructions, 4.0.0 should point to Player 10 by default.
The problem is I don't see code hints in Flex Builder 3 Standard edition (build 3.0.2.214193)
Builder doesn't hint Player 10 functions for both SDKs and does not allow to compile with fl package.
If I add
import fl.controls.Label;
Builder hints it "1172: Definition fl.controls:Label could not be found"
Mar 31, 2009
Dennis van Nooij says:
looks like when targeting Flash player 10, the Flex builder profiler no longer w...looks like when targeting Flash player 10, the Flex builder profiler no longer works? Can anyone from Adobe confirm this?
Mar 31, 2009
Matt Chotin says:
Should work with 3.0.2.Should work with 3.0.2.
Jul 21, 2009
Daniel Davis says:
I've followed all the steps here, but I still can't get Flex to compile and run ...I've followed all the steps here, but I still can't get Flex to compile and run my apps in FlashPlayer 10 without using the HTML wrapper. I prefer to test without launching the browser so I disable the Generate HTML wrapper file option. When I build and run it that way, it still builds using FP 9.
Aug 21, 2009
margaret lenins carter says:
thank you. i did not find any problems with my adobe services.thank you. i did not find any problems with my adobe services.
Dec 12, 2010
xochitl flores says:
to target either Player 9 or Player 10 with the same SDK: I dont'n understand t...to target either Player 9 or Player 10 with the same SDK:
I dont'n understand this point:
WHen do I this??
Nov 25
nagarjun nagarjuna says:
Currently i am using Flex SDK Version 3.0.0 build 477 and Flex Builder 3 When i ...Currently i am using Flex SDK Version 3.0.0 build 477 and Flex Builder 3
When i try to configure to flash player 10 by following the given steps compiler giving the below errors.
playerglobal.swc(flash/display/Graphics): Error: abc bytecode decoding failed.
playerglobal.swc(flash/geom/Matrix3D): Error: abc bytecode decoding failed.
playerglobal.swc(flash/display/BitmapData): Error: abc bytecode decoding failed.
Trying to resolve this issue but no success.
Any help would be Thanks full