1. Home
  2. Computing & Technology
  3. Animation

Deconstructing the Paint Application VI: The Gradient Rectangle Tool

By , About.com Guide

2 of 8

Defining Behavior on Mouse Move

Just like with the rectangle tool, the gradient rectangle uses an outline to track the dimensions of the rectangle being drawn, as long as the mouse button is depressed and the cursor is in motion.

You can actually just use the exact same tracker from the rectangle tool, and just make sure to modify the if statement checking for the active tool to include an ||_root.isactive==”gradientrec” (The || symbol stands for OR, so that the tracker is used if the rectangle tool is active or the gradient tool is active - the if statement condition is satisfied as long as it’s one or the other, and doesn’t require both.)

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 VI: The Gradient Rectangle Tool

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

All rights reserved.