RIA Developer, Flex / Flash, Widgets
Tip of the Day – Compile your AIR Applications for Flash Player 10
I was playing with Cocomo today and hit a wall dealing with the Flash Player 10 version of Cocomo.swc while using Adobe AIR. I created a new AIR application in Flex Builder 3, and pointed it to the Flex SDK 3.2. I then linked in the FP10 version of Cocomo.swc. Everything was going fine until I tried to run my application and it threw “Error #1065: Variable SoundCodec is not defined.”
After doing a bit of research, I learned this error occurs when trying to run Flash Player 10 code in the Flash Player 9 runtime. I thought Flex Builder would handle this for me automatically when I pointed it to the 3.2 SDK.
So here is the fix and your tip for the day.
Within Flex Builder:
- Select your AIR application in the Flex navigator
- From the menu choose, Project > Properties
- Choose “Flex Compiler”
- Add “-target-player=10″ to your Additional compiler arguments
- Click OK
This isn’t limited to Adobe AIR, you can set the target player of your Flex applications as well.
| Print article | This entry was posted by Nate Beck on January 20, 2009 at 11:04 pm, and is filed under Cocomo, Flex, Tip of the day. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |


about 2 weeks ago
Error “configuration variable ‘target-player’ must only set once
about 2 weeks ago
@Daniel,
Make sure you’re not also setting the version in the Adobe Flash Player options section of the Flex Compiler menu. This can cause the conflict you mentioned.
Cheers,
Nate