Importing Graphics into Flash CS3 Professional
What You'll Learn in This Hour:
- How to import vector graphics into Flash
- How to import bitmap (raster) graphics
- Ways to avoid imported graphics
- How to optimize and maintain the best quality possible when importing
In the last two hours, you've seen how you can create sophisticated custom graphics very quickly in Flash. Despite how powerful Flash's graphic creation tools are, eventually you might want to import graphics created elsewhere. Two good reasons for this are to use photographic images or to use existing graphics (instead of re-creating them from scratch). You can certainly use these other graphics inside Flash—and that's what you're going to learn how to do in this hour. Before we start, let me suggest that—when it's practical—you should try to create your graphics inside Flash because they'll tend to keep your file size small.
Vector Graphics Versus Raster Graphics
Vector graphics have certain characteristics that are due to how they are stored by a computer. A vector graphics file contains the math to redraw the image onscreen. For example, a circle includes information such as the radius, the line thickness, and the color. All the graphics you create inside Flash are vector based. Vector graphics have two advantages: The file size tends to remain small (therefore, it downloads fast), and the image can be scaled to any size without any degradation of the image quality (a circle is still a circle, even if it's a large circle).
Vector graphics are great, but it's important to realize their disadvantages. Vector graphics require the user's computer to work hard to display the image (it has to do a lot of math) so you may see slower performance if an animation contains vector graphics. Also, vector graphics often look "computery" or antiseptic because they tend to involve geometric shapes. Both disadvantages can be overcome, but you should be aware of them.
Bitmapped graphics (also called raster graphics) are fundamentally different from vector graphics. A raster graphics file contains the color information for each pixel. If the image is 100 pixels by 100 pixels, that's 10,000 pixels, each of which has a color value. As a result, raster graphics are almost always relatively large files. Raster graphics also can't be scaled very effectively. They tend to get grainy, similar to a photograph that has been enlarged. An advantage of raster graphics is that they appear onscreen very quickly.
It might seem that vector graphics are obviously the better choice. However, the decision of whether to use vector graphics or raster graphics should be based on the nature of the image. If the image is geometric, with clear delineations of color, a vector graphic is a good choice. If the image is a photograph of a person or a geographic location, nothing but a bitmap will do. Selecting which format to use is pretty easy when you know the considerations of each type.