Basics: Radians and degrees
 
Description
Macromedia Flash measures the rotation of symbols in degrees. However, when using trigonometric functions (such as, sine and cosine), values are returned in radians. This sample demonstrates how you can use ActionScript to convert radians to degrees. It also demonstrates how to calculate the hypotenuse for x and y coordinates to determine the distance between two points.
 
Key features and ActionScript elements
Math object, dynamic text, draggable symbols
 
Instructions
Drag the rotating circle and watch the values in the text fields. Click the Reset button to return the circle to the center of the cross hairs.
 

 
The source file for this movie (360_degrees.fla) can be found in the Flash MX/Samples folder.