Flash CS4 ActionScript 3.0 Tutorial
How to Assign a Button Symbol, Movie Symbol, Input Text Object, or Dynamic Text Object a Variable Name to be Used by ActionScript
Whenever you create an instance name, you are adding a new variable to your ActionScript. Instance names can be added to Button Symbols, Movie Symbols, Input Text objects, and Dynamic Text objects. To enable code hinting in the ActionScript panel, be sure to add Button (_btn), Movie (_mc) and Text (_txt) suffixes to your instance names. In other words, you might name your Movie Symbol, spaceMonster_mc.
Naming an Instance
When naming variables or instances, observe the following rules:
Use numbers and letters
Avoid using any special characters
Character exceptions are ($, _)
Don't use any reserved words (they appear in blue)
Never start an instance with a number
Assign a name that makes sense
Movie Symbol with instance name myMovie_mc
Add a Movie Symbol to the stage and select the symbol with the Selection tool (v key).
Open the Properties panel (Cmd/F3 (PC-Ctrl/F3)) and type in the name myMovie_mc for the Instance Name.
Add a new layer called Actions.
Option double-click (PC - Alt double-click) the keyframe in the Actions layer to open the ActionScript panel.
Copy/Paste the following code to the ActionScript panel.
myMovie_mc.scaleX = 2;
Test your movie by pressing Cmd/Return (PC - Ctrl/Enter). By setting scaleX equal to 2, the object becomes twice as wide as its original size.