It was one of my first posts on this blog: Work with Flash 10 in Flex Builder 3. This post has proven to be very helpful and is still read a lot every day!
As Flash 10.1 is currently accessible in beta. I thought it would be nice to have some tutorial to build applications targeting this new version of the player to take advantage of the new APIs (like multitouch for example). This tutorial will provide a generic solution to enable the creation of Flash 10.1 capable projects in both Flex Builder 3 and Flash Builder 4.
Step 0: Download the latest Flex SDK
This step is not mandatory and should not be necessary if you already have a Flash 10 capable Flex SDK. Still, keeping your SDK up to date is always a good thing and this tutorial might be a good opportunity to do it!
As the Flex 4 SDK was just released a few days ago, I recommend you download, install and use it for the rest of the tutorial.
In the rest of the tutorial, $SDK_DIR will designate the path to the Flex SDK you want to use (ie. "C:\Program Files\Adobe\Flash Builder 4\sdks\4.0.0" for example).
Step 1: Download and install playerglobal.swc
- Go to $SDK_DIR\frameworks\libs\player and create a new folder called "10.1"
- Download the new Flash 10.1 capable playerglobals.swc library from Adobe Labs
- Extract playerglobals.swc from the downloaded ZIP file to the new "10.1" directory you just created
Step 2 : Setup your Flash 10.1 project
- Open Flash Builder 4
- Create a new Flash/Flex project or open the project you want to setup
- Open the properties of your project (right click on your project in the Package Explorer > Properties)
- If you are using Flash Builder 4, go to the "ActionScript compiler" panel and in the "Adobe Flash Player options" section, check "Use a specific version" and enter 10.1.0 as the version number
- If you are using Flex Builder 3, go to the "Flex compiler" panel and in the "Additional compiler arguments" text input add "-target-player=10.1.0"
- Click "OK"
Step 3 : Build your project
Press F11 to build and run your project. Everything should work fine and you should now be able to use the new Flash 10.1 APIs!
You can now create as much projects as you want and you just have to do Step 2 to make sure it will target Flash 10.1!
In a previous post (cf. Work with Flash 10 in Flex Builder 3), I explained how to start using Flash 10 with Flex Builder 3 in a "classic" Flex Project. But if you want to create a Flash 10 Flex Library Project, it is a little bit more tricky.
UPDATE: you can also read the new "Build Flash 10.1 applications with Flex Builder 3 or Flash Builder 4" tutorial.
Flash 10 Beta is a good occasion to test some of the new features that the next version of this incredible piece of software will provide. This short step-by-step "how to" tutorial will teach you how to install the new Flex SDK and configure Flex Builder 3 in order to use it.