Tutorial details:
Written by: Cody Lindley
Website: www.oh-zone.com
Difficulty Level: Advanced

PURPOSE:This is a look at trigonometry for practical use in flash actionscript. I am one of those people who could have cared less about trigonometry when it was taught to me in high school. Today I am kicking myself for not paying more attention in math class.

WHY: The reason for this refresher is for the purpose of writing/programming actionscript in flash that will fake 3D in a 2D space. This was written for my own notes, but I decided someone else out there might get some use out of it.

WARNING: The trigonometry is a review for any one with some common sense and the desire to learn. I do however expect the readers of this material to be knowledgeable about actionscript programming techniques when it comes to writing code for flash. With that said. Expect very little explanation about flash and the code itself. However anyone who considers themselves a flash actionscript guru should be fine. Time for a reality check yet? (You need math to understand trigonometry! You need Colin Moock's book on actionscript to understand scripting techniques in flash.) Last word, reader be ware I am not a writer and this was not written for the the purpose of regenerating these ideas in flash. Think of this material as just a tutorial on the concept of trigonometry and flash, an overview really.

DISCLAIMER: Ya, I know. This stuff is not new and for the most part I am just rehashing what I've read in books, examples and all. So don't go thinking I am some super smart guy. The reality is I just read a lot of books. And the people who wrote those books are just people who read a lot of books. And the people who wrote those books are, well, you get the idea. Credit will be giveing to those books at the bottom of this page.

Normal Cartesian coordinate system: This is a regular old Cartesian coordinate system

<<Normal--- Flash>>
Flash Cartesian coordinate system: Take careful note of the differences. Which is that the y axis is flipped. For future reference also consider that there is a z axis coming strait out of the center of this graph and heading strait for you eyes (more later).

This is actually what the Cartesian coordinate system looks like in flash on the root timeline. It will always start in the upper left hand corner on the root timeline. Note that any object defined by the Cartesian coordinate system uses points whether it be a single point or a box with 4 separate coordinates for each side of the box. The top upper left hand corner in flash has the coordinates (0,0).

Note: coordinates represent positions in terms of width along the x axis and height along the y axis.

This is actually what the Cartesian coordinate system looks like in a movie clip in flash. For example lets say that the orange ball is in a movie clip called ball. The center of the orange ball would be at (0,0) in the movie clip if the ball graphic was center inside of the clip (demonstrated below). The exact center of this ball would be at (0,0). We could go on to define the balls height and width by measuring the distance the ball covers along the y and x axis.