Export Library Movie Symbol for ActionScript
Flash CS4 ActionScript 3.0 Tutorial
How to Access Flash Library Symbols with ActionScript
Once you create a Symbol, it is added to the Library. ActionScript can talk to Movie Symbols or Button Symbols.
To make this happen, we must first assign the Symbol a Class Name. Once the Class is defined, we call the Class with ActionScript and assign our new object a unique variable name. There are a few rules about Class naming conventions. For more information, see topic, Class (Naming).
Movie Symbol with name greenOval
Add a oval object to the workspace with the Oval tool (o key).
With the oval selected, press F8 (Modify > Convert to Symbol).
In the dialog box, name your symbol GreenOval and choose Movie clip for the symbol type.
Delete the original oval object from the stage.
Open the Library (Cmd/L (PC - Ctrl/L) and select the new symbol.
Choose Properties from the Library pull-down menu.
In the Advanced mode, Linkage section, click Export for ActionScript and a Class Name appears. Class names generally start with a capital letter.
Add a new layer at the top of the stack, named Actions.
Open the ActionScript panel for your keyframe in the Actions layer by Option double-clicking (PC - Alt double-clicking) the keyframe.
Copy/Paste the following code in the ActionScript Panel:
var greenOval_mc = new GreenOval();
Test your movie by pressing Cmd/Return (PC - Ctrl/Enter).