X and Y Positioning in Flash

Cartesian vs. Flash Coordinate system

You're probably familiar with the classic Cartesian coordinate system from your math classes. The Cartesian system (sometimes called the Standard coordinate system) has an origin point (0, 0) from which the x values spread horizontal, and the y values spread vertical. The x values are positive to the right of the origin point and negative to the left. The y values are positive above the origin point and negative below it. Like this:

Cartesian Coordinates

Flash has a slightly different coordinate system. First of all, The origin point (0,0) is in the upper left corner of the main timeline. The main difference is that the y values are reversed. So, as you move down from the origin, y is positive. And if you move up from the origin, y is negative:

Flash Coordinates

Play with this demonstration a bit, you'll see how the Flash (x,y) coordinate system works:

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player