Amethyst TutorialsBack to Tutorials Amethyst Tutorials
ActionScript Editing For Flash IDE Projects
Amethyst is not ‘just’ a Flex IDE. It can be used to develop Flex, AIR or ActionScript projects and it makes a great code editing partner to Adobe’s Flash IDE (e.g. Flash CS3 or CS4).
To share a project between the Flash IDE and Amethyst it is easiest to create both projects in the same directory structure. If you have an existing Amethyst ActionScript project, you can create your Flash project (its ‘.fla’ file) in the same directory or in a subdirectory.
If you have an existing Flash project, use the Amethyst File/New/Import or Convert Flex Project option. In the Import/Convert Wizard, select ‘Convert project in original location’, browse to the directory containing the .fla file and select ActionScript as the project type. More details of the Amethyst Import/Convert wizard HERE.
For example, here I have converted a simple adventure game which I originally wrote for Flex. My aim was to reuse as much of my original ActionScript source code as possible while recreating the user interface using Flash (rather than Flex) components. The directory structure I am using is like this:
\FlashWombat2 <- This directory contains the Amethyst solution file: FlashWombat.sln
\FlashWombat2\src <- This directory contains the Amethyst project, ActionScriptAdventure.amproj, and the Flash IDE project, FlashWombat2.fla
The source directory also contains my ‘top level’ source file, ActionScriptAdventure.as, and this has been set as the main class in the Properties panel of the Flash IDE.
Beneath the \src directory I also have another directory called \Classes which contains the Room class which is imported into the main project’s code. In principle, you could have many other classes in many other subdirectories.
With this arrangement, I can now share exactly the same code files between Amethyst and the Flash IDE. This makes it convenient to use the Flash IDE for the visual design or animation and Amethyst for the coding. In this case, since my code references by name certain components created in the Flash IDE, I am obliged to compile and debug using the Flash IDE rather than Amethyst. This is because the component identifiers are embedded into the Flash IDE’s ‘.fla’ project file rather than in source code available to Amethyst. If you create a ‘pure’ ActionScript project (that is, one that has no dependencies outside the source code), you may compile and debug using Amethyst.
For Flash IDE users who would like to use all the advanced coding and IntelliSense features of Amethyst, arranging your Amethyst/Flash projects in a shared directory structure as explained above will give you the best of both worlds.
So even if you are a Flash developer who never uses Flex, Amethyst is still a tool that can considerably enhance your programming productivity.