|
|||||||||||
How
to create a starter skeleton project in Adobe flash using ActionScript 3.0. |
|||||||||||
part I |
|||||||||||
A very basic tutorial for creating an Adobe flash file. |
|||||||||||
(page 2) |
|||||||||||
December
29, 2008 |
|||||||||||
page 1, page 2 | |||||||||||
The previous page describes some of the boxes contained in the flash CS3 authoring tool. Before including the script file that was created, we need to modify a few settings in the authoring tool. In the stage's property settings; the box sitting below the stage labeled properties, click to modify various settings:
Next, we can include the actionscript code. First we must tell the authoring tool where the script files are located, this is done by setting the classpath. Within this tutorial we set that path to .\scripts, or if you called it something else, then that should be the directory path used here. This setting can be found and modified in a couple of ways:
Now, we can import the script file: Main_Class.as
If, at some point, an error message pops up, it may say that a path to the class cannot be found. This only means that something in the settings for the location of the new class is amiss. It could be that the directory path, the name of the script file, or the nameing of the class may not be set correctly. At this point the fla's authoring window should look as follows: (click to enlarge) Save the project file: (top menu bar) File >> Save. Test the Movie file: (top menu bar) Control >> Test Movie. If all went well, the output of the test should be two windows: one output text window, containing the text string from the constructor member function, and one other window which is the 300x300 pixel sized box, still empty, flash movie window. The output window with the text message will only pop up when testing the flash movie file from within the flash authoring tool, it will not come up if the swf file is viewed from within a web browser. Here are a couple of links of what is possible: Part II continues by placing images onto the stage, and then adding code to manipulate those images. |
|||||||||||
|
|||||||||||