1. Home
  2. Computing & Technology
  3. Animation

Flash “Coloring Book” with setRGB

By , About.com Guide

5 of 10

Now create a palette by drawing a grid (you can draw one rectangle and then copy-paste it, move it, and use the Paint Bucket tool to change its fill color repeatedly). One larger rectangle should be at one end or the other, to represent the selected color; for now you can start off by filling it in with white, though we’ll change that using setRGB later.

You can give the user as many or as few colors to choose from as you wish, but one thing that you’ll need to do as you fill them in is note down the RGB hex codes for each one. If you look in the Color Mixer Panel, below the large square that lets you view the color chosen, you’ll see a little text box that displays the pound sign (#) and a six-digit alpha-numeric value. This is the hex code defining the red, blue, and green values that combined to make the shade, and it’s used in HTML to set colors for various elements.

It’s also used in ActionScripting, which means that you’re going to need to note the hex value displayed for each color that you choose. I kept a scratch pad while I worked, with a grid drawn out to match the one on my stage, and wrote the hex value in each box as I filled it in (FFFFFF for white, 000000 for black, CCCCCC for light gray, etc).

Once you’re done, select each individual fill (but not its outline) and convert it to a symbol (F8). You should have as many symbols as you do colors to choose from.

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. Flash “Coloring Book” with setRGB

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

All rights reserved.