Classes+for+Symbols

When you first "Convert to Symbol" or insert a new Symbol, you can make the connection then. If the button in the lower right corner says "Advanced," click it to show the complete window. Once you open the full version, you can click on the "Export for ActionScript" checkbox. It should auto-fill the name (from the "Name" field at the top of the window) into the "Class" field. The class name should start with an upper-case letter and have no punctuation or spaces in it. Remember this name - you'll need it for future steps!
 * When you make a MovieClip Symbol, how do you make a connection to a corresponding .as file?**

Yes. Find the symbol in your Library. Hold down the "control" key and click (i.e., right-click) on the icon to the left of the name and scroll down to "Properties." Then follow the instructions in the previous question.
 * If you already have a MovieClip Symbol in your library, can you still connect it to a corresponding .as file?**

With the "V" selection arrow, click on the background of the movie. Go to the Properties panel. In the field called "Class," enter the name of the class for the main MovieClip. Use the same naming conventions as above.
 * If you want to link to the main movie, how do you do that?**

Go to the File menu and select "New." Then scroll down to pick an "Actionscript File" (the first white icon in the list.) Save this file in the same folder as the .fla file with the same name as your class name, and the suffix ".as." (For example, if your class name is "Asteroid," you'd call this "Asteroid.as.") At the very minimum, your file should look like this (your colors may vary from what appears on the webpage): code format="actionscript3" package {   import flash.display.*;
 * How do you make the corresponding file?**

public class Asteroid extends MovieClip {

public function Asteroid {

}   } } code Note: the two places in this code that say "Asteroid" should be replaced with the name of your class, and it must match exactly. The first one (public class Asteroid) says that you are making a class called "Asteroid" to match up with the MovieClip you made. In fact, the "extends MovieClip" is saying that this is a class that acts just like a MovieClip, but has extra stuff, which we'll define. The second place (public function Asteroid) is the constructor function - it will be called automatically whenever you create an Asteroid. At the moment, it does nothing special. Note 2: the import flash.display.*; line is what tells the computer what a MovieClip is when it reads this file. You may find that you need to import other things as well, depending on what you are doing with this class!

Simply put, if you want an instance of this symbol to be anything that moves in response to you or the an artificial intelligence you write (rather than a passive object), this file is where you will define what the behavior of the instance will be.
 * Why would you want to do this?**