Table of Contents
## Workshop Chapter 11. Using Math to Create a Circular Slider

##### Figure W11.1. Making eyeballs follow the mouse is one of the fun things you can do with math.

Entire Site

By now, you’re probably quite familiar with calculating percentages based on minimum and maximums. You’re also probably quite comfortable writing scripts for the `enterFrame` and `mouseMove` events. This workshop chapter involves using just a few trigonometry concepts to calculate angles and to specify locations around a circular path. Suppose that you have two known points, such as the center of a clip and the current position of the mouse. Calculating the angle of a line drawn through those points is the main task in this workshop. Although the applications of such a trick can include creating eyeballs that appear to follow the mouse movements (see Figure W11.1), we can actually use this knowledge for something more practical: a slider that moves along a curved path.