October 2011
Beginner to intermediate
558 pages
16h 30m
English
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.
There are four methods that you need to know to be able to draw lines and curves: lineStyle, moveTo, lineTo, and curveTo.
- The
lineStyle(width, color, alpha)method takes three arguments: the width of the line to be drawn, the line color, and its transparency.- The
moveTo(x, y)method moves the cursor to the specified location(x, y)without drawing anything.- The
lineTo(x, y)method draws a straight line from the current location to the ...
Read now
Unlock full access