The Flash coordinate system

In the real world things exist in space. In the Flash world the equivalent is that objects exist on the stage. To know how to position objects on the stage, it is necessary to understand the Flash coordinate system.

2D coordinates

Flash's coordinate system is somewhat different from the usual Cartesian system of coordinates in math. In normal coordinate geometry, the x-coordinate runs from left to right, and the y-coordinate runs from bottom to top (see Figure 2-1b). In Flash, however, the y-coordinate runs in the opposite way, from top to bottom (see Figure 2-1a). The origin is in the top-left corner of the visible stage.

The usual Cartesian system is called a right-handed coordinate system because if you hold your ...

Get The Essential Guide to Physics for Flash Games, Animation, and Simulations now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.