Basic AS3 Tutorial

From FDT Documentation

Revision as of 18:07, 13 September 2010 by Aklement (Talk | contribs)
Jump to: navigation, search

Beginning with FDT4, creating AS3 projects has never been easier. FDT 4 now features powerful template management that are designed to help developers get up and running in a flash.

If you haven't installed and created your workspace yet, check out the Installing and Running FDT tutorial to guide you through the process.

Once you have FDT open, you have a few different ways of creating a new project. You can click "Create new Flash Project" via the Welcome Screen, right click in the Flash Explorer and choose 'New Flash Project' or choose 'New Flash Project' from the 'File>New menu' ( OSX ). Right away you'll see FDT's new Project Template Wizard open. Give the project a new name, 'AS3 Project' will work fine, and let's stick with choosing 'Empty AS3 Project'. When a valid project name has been added and a project template has been selected, the 'Finish' button will highlight. Click finish to continue.

Now we can see our project FDT created for us within the Flash Explorer. Click on the little arrow next to the project icon to expand it's contents. Here you can see a basic FDT project setup and see what our 'Empty AS3 Project' template has setup for us:

To run and build a Flash Project, FDT only needs one file. If you're familiar with Flash Authoring or Flash Builder, this is like creating your 'Document Class' or 'Main' class. Create this file by right clicking on the 'src' folder and choosing 'new>AS Class'. What pops up is FDT's New ActionScript Class Wizard. Once here, we'll just fill in a valid class name, 'Main' is pretty standard, and then define the superclass by clicking on the 'Browse...' button. You can use either 'Sprite' or 'MovieClip' for superclass and unless you have a special reason, Sprite will work fine. Filer the Sprite class by beginning to type 'Sprite' within the search input box on the top and when you see "Sprite - flash.display" click on that and hit the 'OK' button. After filling in a valid Class name and a valid superclass to extend, hit the 'OK' button.

FDT will now create a new Class for you automatically and open it within the Editor View.

Get FDT5