The Flash drawing API
The Flash drawing application programming interface (API) allows you to draw things such as basic shapes and fills using ActionScript. Technically, this is possible because all display objects have a
graphics property that can access the methods of the drawing API.
Drawing lines and curves
There are four methods that you need to know to be able to draw lines and curves:
lineStyle(width, color, alpha)method takes three arguments: the width of the line to be drawn, the line color, and its transparency.
moveTo(x, y)method moves the cursor to the specified location
(x, y)without drawing anything.
lineTo(x, y)method draws a straight line from the current location to the ...