Table of Contents
## Chapter 11. Manipulating Information

Entire Site

The information that you store in variables, modify in expressions, and test with conditional statements often needs to be processed and manipulated by mathematical functions such as square roots, sines, cosines, and exponents. Flash can perform these calculations with the Math class, which lets you create formulas for complicated interactions between the objects in your movie and your viewer or for sophisticated geometry in your graphics. The Math class, for example, allows you to model the correct trajectory of colliding objects or the effects of gravity for a physics tutorial, calculate probabilities for a card game, or generate random numbers to add unpredictable elements to your movie. Much of the information you manipulate sometimes needs to be stored in arrays to give you better control of your data and a more efficient way to retrieve it. You can use the Array class to keep track of ordered data such as shopping lists, color tables, and scorecards.

When the information you need depends on the time or the date, you can use the Date class to retrieve the current year, month, or even millisecond. Build clocks and timers to use inside your Flash movie, or send the time information (along with a viewer’s profile) to a server-side script.