Flash CS4 ActionScript 3.0 Tutorial
How to Change Button Symbol, Movie Symbol and Text Properties with Flash ActionScript
Often times we wish rotate, alter the alpha value, or scale an object using ActionScript. Object Properties can be altered using a single line of code.
The properties you have access to include; Alpha, Height, Location on Stage, Rotation, Scale, Visible, and Width. For information on each of the properties, see topics, Alpha Property, Height Property, Location on Stage Property, Rotation Property, Scale Property, Visible Property, and Width Property.
Movie Symbol with instance name propMovie_mc
Add a Movie Symbol to the stage and click the symbol with the Selection tool.
Open the Properties panel (Cmd/F3 (PC-Ctrl/F3)) and type in the name propMovie_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.
propMovie_mc.rotation = 90;
Test your movie by pressing Cmd/Return (PC - Ctrl/Enter). By setting rotation equal to 90, the object rotates 90 degrees in the clockwise direction.