1. Home
  2. Computing & Technology
  3. Animation

Deconstructing the Paint Application II: The Brush Tool & the Flash Drawing API

By , About.com Guide

1 of 9

ActionScripting for the Brush Tool Button

Now that we’ve set up the base of the paint application and made the canvas color button work, let’s move on to the brush tool.

The first thing we’re going to do is define what happens when the brush tool is clicked. Mainly we just want Flash to know that the brush tool is now active - so that when it checks for certain conditions when the mouse is pressed, moved, or released, it knows how to behave. We’re again using that variable _root.isactive for this; last time we set the value to null/nothing, but this time we want to give it an actual value:

on (release) {
_root.isactive = “brush”;
}
Explore Animation
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Deconstructing the Paint Application II: The Brush Tool and the Flash Drawing API

©2009 About.com, a part of The New York Times Company.

All rights reserved.