25 August 2010
By default, instances of movie clip symbols in the Library cannot be dynamically created—that is, created using only ActionScript. This is because each symbol that is exported for use in ActionScript adds to the size of your SWF file, and Adobe Flash Professional discards symbols in the Library that are not used on the Stage during the publish process. For this reason, in order to make a symbol available in ActionScript, you must manually specify that the symbol should be exported for use with ActionScript at runtime.
To export a symbol for ActionScript, follow these steps:
By default, the Class field is populated with the symbol's name without spaces (for example, a symbol named "Green Parrot" would become "GreenParrot"). To specify that the symbol should use a custom class for its behavior, enter the full name of the class including its package in this field. If you want to be able to create instances of the symbol in ActionScript, but don't need to add any behavior, you can leave the class name as is.
The Base Class field's value defaults to flash.display.MovieClip. If you want your symbol to extend the functionality of another customer class, you can specify that class's name instead, as long as that class extends the Sprite (or MovieClip) class.
At this point, if Flash cannot find an external ActionScript file with a definition for the specified class (for instance, if you didn't need to add behavior for the symbol), a warning dialog box is displayed:

If you do not provide a class for your symbol, Flash will create a class for your symbol equivalent to this one:
package
{
import flash.display.MovieClip;
public class MyMovieClip extends MovieClip
{
public function MyMovieClip()
{
}
}
}

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License