Home > Articles > Web Development > Dreamweaver & Flash

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

Using Bitmaps (Also Known as Raster Graphics)

In this section we'll see how bitmapped (raster) graphics can be used in Flash. Raster graphics have inherently unique characteristics that can't be created inside Flash. The only warning against this option is to make sure you really need raster graphics. Here is a summary of uses that require raster graphics:

  • A photograph. The only time to consider a vector alternative to a photograph is when the picture is of a very geometric object. Otherwise, photographs should be raster.

  • A series of still images extracted from frames of a video.

  • An image with special effects that can't be achieved with a vector tool, such as clouds, fire, water, and other natural effects. (Of course, this is an invitation for a talented artist to re-create such an effect with a vector tool.)

If you're unfamiliar with the difference between vector and raster graphics, learning when one choice is better than the other can take some time. The file formats .gif, .jpg, .png, .bmp, and .pct are all raster graphic formats. However, just because a file was saved in one of these formats doesn't mean it was done appropriately. It's the nature of the image in the file that matters. If all you have is a .gif, for example, you need to first look at its contents to judge whether it's appropriate for raster graphics. Here's an easy way to decide: If you can trace or redraw the image in the file (with Flash's drawing toolbar, for instance), you're much better off redrawing it. If it's a photograph, you would never be able to trace it (so leave it as a raster). If it's a picture of a plain box, maybe you could draw it just as well, and thus take advantage of all the benefits of vector graphics without even bothering with raster.

Importing Raster Graphics

Importing a raster graphic is pretty simple to do. Just select the menu File, Import and point to any raster graphic Flash supports: .jpg, .png, .gif, .bmp, or .pct. That's it. (In fact, Flash will import a few other esoteric formats—like Photoshop version 2.5—but the five listed here are by far the most popular.)

However, importing not only places the graphic onstage but also puts a master bitmap item into the library. If you import a raster graphic and then delete the object onstage, the master bitmap item will still be in the library (found with the menu selection Window, Library). It's called a bitmap item, and it has a little icon that looks like a picture of a tree (shown in Figure 3.7).

Figure 3.7 After importing a raster graphic, the bitmap item will appear in your library.

After a raster graphic is imported, you need to keep it in the library. This bitmap icon provides a way to specify how the image should be exported when you create a movie for the Web. If you leave it unchanged, your raster graphics will export using the default settings. You also can specify special settings for just that image. Let's import a raster graphic and explore some of these settings.

  • + Share This
  • 🔖 Save To Your Account