Graphics Programs Reference
In-Depth Information
y
(4,2)
(12,4)
x
x
Standard Coordinate System
Flash Coordinate System
y
Figure 5.3 Screen coordinates and Flash coordinates
We can generalize the preceding passage in the following way. If the origin of the
screen coordinate system is at some point (xo,yo) on the Stage and we are at some
point (xs,ys) in screen coordinates, then we can transform that point into its corre-
sponding Flash coordinates (_x,_y) by the following expressions:
_x = xo + xs
_y = yo - ys
Figure 5.4 Transformation from screen to Flash coordinates
Angles
In Flash, positive angles are measured from the x-axis and are rotated in a clockwise
direction as shown in Figure 5.5. Angles of rotation are measured in degrees (0 to
360). Negative angles (0 to -360) are measured in a counterclockwise direction from
the x-axis. The rotation of an object is about its registration point.
x
angle
y
Figure 5.5 Measuring angles in Flash
 
Search WWH ::




Custom Search