• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part IIB: Intermediate Workshops > Using Math to Create a Circular Slider

Workshop Chapter 11. Using Math to Create a Circular Slider

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.

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



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint