Home > Articles

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Working with Bitmaps

In this section you'll learn more about using bitmapped graphics as individual elements. For instance, you can very easily use a bitmap as a fill color for another graphic.

Breaking Apart a Bitmap and Using It as a Fill Color

Here are the steps to follow to break apart a bitmap and use it as a fill color:

  1. With a bitmap graphic selected, choose Modify, Break Apart. Notice that the bitmap now look more like a primitive object.

  2. Choose the Dropper tool in the Tools panel.

  3. Notice that the fill swatch has a small icon representing the bitmap.

  4. Choose the Rectangle tool and draw a square on the stage. Notice that it's filled with the bitmap!

  5. Now you have the option of transforming the fill using the Transform Fill tool.

Trace Bitmap

Another great feature of Flash MX is having the ability to turn your bitmap graphics into vectors. This can save file size, if the bitmap doesn't have a great deal of detail. It's also an advantage if you plan to animate the graphic and have it scale up. It's important not to break apart the bitmap. If you do, Flash will only recognize it as a primitive and not as a bitmap. If you have the bitmap selected on the stage, select the Modify, Trace Bitmap menu command. Here are the options you'll find in the dialog box that appears in Figure 3.34:

Figure 3.34 The Trace Bitmap dialog box.

  • Color Threshold. This option compares adjacent pixels. If the RGB color values between the two pixels are less than the Color Threshold value, these color values will be considered the same. You can set the Color Threshold value between 1 and 500.

  • Minimum Area. This option's value determines how many pixels to evaluate when setting the color of a pixel. You can set a value between 1 and 1000.

  • Curve Fit. This option determines how smooth the vector lines are drawn after the trace has been performed.

  • Corner Threshold. In this drop-down menu, choose either Many Corners, Few Corners, or Normal. If Few Corners is chosen, corners will be smoothed out in the image. If Many Corners is selected, many of the corners in the image will be preserved. Normal is between Many and Few Corners.

If you want the graphic to look more accurate, choose Many Corners, with lower Color Threshold and Minimum Area values (see Figure 3.35). However, this will probably increase the file size and will bog down animation playback. If you chose higher values, the image may be less accurate and offer a more stylized look, but it will be more functional in a Flash animation.

Figure 3.35 A bitmap before and after the Trace Bitmap command. Notice the stylized look on the left.

Swap Bitmap

Swap Bitmap is a new feature in Flash MX. This feature allows you to swap out a bitmap on the stage with any other imported bitmap in the document. With the bitmap selected on the stage, choose Modify, Swap Bitmap to launch the Swap Bitmap dialog box. In this dialog box, choose the new bitmap that will replace the existing bitmap on the stage.

  • + Share This
  • 🔖 Save To Your Account