Main Content

You are here:

Setting up a Project in Flash CS3

Hello and welcome to today's tutorial, where will not actually be doing anything; merely setting up an example project. A project comprises a main .fla handling the graphics and library; plus multiple external ActionScript files. These .as files are little stores of reusable code.

Today we will be creating a project that includes an .fla and one external .as file. The name of the .as file depends on the name of the class, which will in turn depend upon the content. We shall come to classes and what they are in the our first proper tutorial, which you can reach now. The upshot of this is that you will need a new .as file for different tutorials on this site, so although this .as file will be called, our tutorials will probably ask you to call them different things.

Firstly, create a new Flash Project, by pressing Create New - Flash Project on the Welcome screen, or File > New > Flash Project. You will be asked to save it, so do so. I called mine "example" This resembles the screen that will appear afterwards:

The Project Folder window

Next create your .fla file (File > New > Flash File ActionScript 3.0), call it something (mine was also "example") and save it in the same folder as the project. We now need to add it to the project. You can do this in two ways - right clicking on "example" (or other project name) in the Project panel pictured above and selecting Add File, or by pressing the icon of a file that has an arrow on it, and pressing Add File. Either way, navigate to the .fla and open it.

Next comes the .as file, an identical process: create the .as (File > New > ActionScript FIle), and save it (in the same folder will do) using the name of the class that will be inside it (given in these tutorials). Then add it also to the project. You're done!

Well, actually, not quite. The advantage of using projects is that it keeps everything together, and so the whole project executes correctly when you press "Test Project" (pictured). Try pressing it - it will ask you to select the default .fla. Press "Select" in the box that comes up, and double click on example.fla. That will compile the project better than a simple Ctrl/Command and Enter will.