1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Deconstructing the Paint Application III: The Line Tool

By

1 of 4

Setting up the Line Tool Button
Deconstructing the Paint Application III: The Line Tool
For this lesson we’re going to set up the Line Tool – a tool that lets users draw straight lines by clicking and dragging the mouse from the starting point to the ending point. For that we’re going to use the same commands from the last lesson on the Flash Drawing API, but use them slightly differently before adding a new one: clear().

The first step, of course, is to tell Flash how to know when the line tool is active by assigning an ActionScript to the button, the same as we did in the last lesson for the brush tool.

©2014 About.com. All rights reserved.