Flex 4 ’Gumbo’ support in Amethyst
A few people have asked us if we have any plans to support the Flex 4 (code named "Gumbo") framework in Amethyst. The answer is, emphatically, yes. In fact, the current beta of Amethyst already supports Flex 4!
If you want to try this out, first install the latest Flex 4 SDK (I’d suggest the latest stable build):
Unzip this to a directory on your disk. The Flex 4 SDK can be used on the same computer as the Flex 3 SDK. Just keep them in different directories and set Amethyst to use whichever SDK you wish to use for a specific project.
Run and Debug With Flex 4
First tell Amethyst to use Flex 4. With a Flex project already loaded into Amethyst, select Project, Properties, General. Then browse to set the Flex source directory property to the location of the Flex 4 SDK.
Note: If you follow the steps above, the Flex 4 SDK will be assigned to the current project only. If you want to use Flex 4 for all future projects, select Tools, Options, Projects, Amethyst and set the Flex source directory here.
You will now be ready to build, compile and debug your project using Flex 4. To ensure that the project is fully rebuilt, select Build, Rebuild. Examine the Output window (View, Output) for confirmation that the project has been rebuilt for Flex 4.
Now set breakpoints and press F5 to start debugging...
Flex 4 IntelliSense
To have access to IntelliSense for Flex 4, delete the nodes beneath the ‘References’ branch of the Solution Explorer. These represent compiled library files and currently they default to Flex 3. Now add the libraries containing the Flex 4 compiled classes. To do this, right-click References, select Add Reference, then Browse. Locate the \libs folder under your Flex 4 SDK installation. Select flex4.swc and click Add.
Also add framework.swc and framework_textLayout.swc. Now browse to the \player\10 directory and add playerglobal.swc. Close this dialog. You should now see the four libraries which you added arranged as nodes beneath References in the Solution Explorer.
You can browse the contents of the Flex 4 libraries in the Object Browser (View, Object Browser):
To use the classes in these libraries, enter the appropriate import statements into your ActionScript or MXML files. For example, here is how I import all the classes from mx.components (including the new Flex 4 component classes whose names begin with ‘Fx’):
The IntelliSense system will display all available classes when writing the import statement so you may import them one by one if you prefer.
Once imported, these classes will provide IntelliSense in your ActionScript code...
Note that the current beta of Amethyst does not provide Flex 4 IntelliSense for MXML tags. As far as I can determine, the old style Flex 3 tags still work fine in Flex 4. However, we will, of course, add full Flex 4 support for MXML in a forthcoming beta.
In fact, we plan to enhance and extend the entire Amethyst environment to provide first class support for Flex 4. We want to make sure that developers can target both Flex 3 and Flex 4 with the same ease. Please bear in mind that the current beta release of Amethyst supplies only a fraction of the support for Flex 4 which will be provided by the final release. Even so, if you want to create Flex 4 applications (using project management, editing, IntelliSense and debugging) you can do so today using Amethyst beta 3.