|
|
GotoFile>New Keyboard Shortcut: [command/ctrl + N]. This will open the New Document dialogue box.
Select ActionScript File from the Type: selection area. • Click the OK button to open the new file.
Note: You cannot manually draw any artwork in an .AS file. The only thing a .AS file contains is code.Adobe has made a concerted effort to turn ActionScript into a powerful language for all sorts of complex rich Internet applications; they have worked hard at making Flash Player a standard, their Adobe AIR Framework has become an interesting alternative to things like desktop widgets and browser-run online applications. But with all of the effort making ActionScript flexible and powerful enough to satisfy developers, they have alienated many entry-level designers. The learning curve for ActionScript 3.0 is significantly higher than that for ActionScript 2.0.
This tutorial will cover the basics of creating and linking the two files needed to access the full power of AS 3.0. This tutorial will not cover any of the functionality of ActionScript, and it will not explain any of the terminology. Its only purpose is to show how to begin setting up a Flash project. Keyboard shortcuts are shown with square brackets: [Macintosh keys first/PC keys second + OTHER KEYS IN UPPERCASE], menus are shown in italics, buttons are shown underlined, and code is shown in monospace.
Adobe has made a concerted effort to turn ActionScript into a powerful language for all sorts of complex rich Internet applications; they have worked hard at making Flash Player a standard, their Adobe AIR Framework has become an interesting alternative to things like desktop widgets and browser-run online applications. But with all of the effort making ActionScript flexible and powerful enough to satisfy developers, they have alienated many entry-level designers. The learning curve for ActionScript 3.0 is significantly higher than that for ActionScript 2.0. This tutorial will cover the basics of creating and linking the two files needed to access the full power of AS 3.0. This tutorial will not cover any of the functionality of ActionScript, and it will not explain any of the terminology. Its only purpose is to show how to begin setting up a Flash project. A print version is available in PDF format. 1. Prepare the workspace.
2. Create a new .AS file
Note: You cannot manually draw any artwork in an .AS file. The only thing a .AS file contains is code. 3. Set up a package
Note: There are many great books available explaining the meaning behind most of the seemingly strange necessities of ActionScript, and it is advisable that you look through some of them. But one excellent piece of advice for a beginner is to absorb the basics by rote memorization.
4. Set up a class
Note: The name of you class is important because it will be used as the name of the file as well as the name of the constructor function. Give it a name that relates to what it is doing, in this case, Example.
5. Set up the constructor function
Note: Make certain the name of the Constructor, in this case Example, matches the name of the class character-for-character.
6. Save the .AS file
7. Create a new .FLA file
Note: Because all of the changes in the flash movie are made in the Example.as file, you should leave the Main Timeline empty and avoid adding any code through the Actions Panel. 8. Save the .FLA file
9. Link the .AS file to the .FLA file
|