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:
With a bitmap graphic selected, choose Modify, Break Apart. Notice that the bitmap now looks more like a primitive object.
Choose the Eyedropper tool in the Tools panel, and click on the graphic.
Notice that the fill swatch has a small icon representing the bitmap.
Choose the Rectangle tool and draw a square on the stage. Notice that it's filled with the bitmap!
Now you have the option of transforming the fill using the Transform Fill tool.
Another great feature of Flash MX is 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 Modify, Trace Bitmap. Here are the options you'll find in the dialog box that appears in Figure 3.36:Figure 3.36 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 smoothly 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.37). However, this will probably increase the file size and 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.37 A bitmap before and after the Trace Bitmap command. Notice the stylized look on the left.
Swap Bitmap 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.