|
Free Open Book
Macromedia Flash 8 Bible |
Optimizing Vector Graphics for Use in FlashAdobe Illustrator and Macromedia Fireworks are two of the most commonly used vector programs, and there are many other programs that also offer tools or techniques that can add a special touch to your Flash designs. The best effects are often complex, and a detailed description of specific techniques in other programs is beyond the scope of this book. However, with an understanding of how Flash interprets imported vector files, you will be able to apply the information in this chapter to optimize your workflow, regardless of what specific programs you choose to work with.
Maintaining Color ConsistencyFlash can only use an RGB color space, meaning that it renders colors in an additive fashion — full red, green, and blue light added together produce white light. Whenever possible, you should use RGB color pickers in your preferred drawing application. If you're using Illustrator, specifying colors with the RGB color picker ensures that both copied-and-pasted objects and exported files will appear as you see them in the original workspace. If you use CMYK (cyan, magenta, yellow, and black), then you will notice color shifts when the artwork is imported into Flash. Fireworks is an RGB graphics environment, so your artwork will be Flash and Web-friendly.
Saving in the Proper File FormatAs long as you save your file to the correct format and version, Flash can import most common vector formats, with a few limitations on support for editable text and layers. Both Macromedia Fireworks and Adobe Illustrator (version 9.0 or higher) support export to the SWF format — this is one of the most consistently compatible vector formats for importing graphics to Flash, although it does have limitations. Native Illustrator files (.ai) saved directly from Illustrator CS have not been a reliable format for import to Flash MX 2004, but from the testing we've done, compatibility between Illustrator CS2 files (.ai) and Flash 8 is much improved.
Fireworks files (.png), FreeHand files (.fh), and Illustrator files (.pdf and .ai) can be imported to Flash with layers and symbols preserved, but .eps files and .swf files exported from Illustrator will be flattened into a single layer. We discuss the various methods for importing files into Flash from Illustrator later in this chapter.
Converting Text to OutlinesMany of the designs you import from other programs may consist only of vector shapes, but there are times when you also need to handle text. An important aspect of vector graphics that comes up, especially when working with other designers, is font linking and embedding. With most vector file formats, such as Illustrator, FreeHand, or EPS, you can link to fonts that are located on your system. However, if you give those files to someone else who doesn't have the same fonts installed, he or she won't be able to work with or view your file as it was originally designed. Some formats (such as PDF) enable you to embed fonts into the document file, which circumvents this problem. However, whether the fonts are linked or embedded, you may be unnecessarily bloating the size of the graphic file by including all of the font information when you need to render only a few letters in a logo. You can convert any text into outlines (aka paths) in most drawing or illustration programs. In Fireworks, select the text as a text block (with the Selection tool, not the Text tool) and choose Text ⇨ Convert to Paths. In Illustrator, select the text as an object and choose Type ⇨ Create Outlines.
If you have a lot of body text in the file, you may want to copy the text directly into a Flash text box and use a _sans, _serif, or _typewriter device font. These fonts do not require any additional file information (unlike embedded fonts) when used in a Flash movie and will result in smaller .swf files than if you included outlines of all the text.
Tracing to Convert Rasters to VectorsA handful of applications, including Flash and FreeHand, let you trace raster artwork to create a vector "drawing." Adobe's stand-alone product for tracing images, Streamline, has been discontinued in favor of the more advanced tracing tools now integrated as the Live Trace feature in Illustrator CS2.
With any tracing application, keep these points in mind:
With all of the software and tool options available, it can be difficult to keep track of all the variables. The most important thing to decide is how you want your final artwork to look. For example, if you want a minimal silhouetted vector look, then it may actually be better to create a clipping path from the bitmap and fill it with solid color manually than to use an autotrace tool. On the other hand, if you are trying to maintain detail in an image and your goal is simply to reduce your file size, it may be best to import an optimized bitmap directly into Flash (where you can then apply the Break apart command and erase any unnecessary parts of the image). The two traps that you want to avoid in production are bloated file sizes and needless quality loss. There are certainly times when you will have to compromise on image size or resolution in order to keep your Flash movies streamlined, but don't make the mistake of assuming that the worse the image looks, the smaller your file will be — this is not always the case.
Figure 37-1 compares the same bitmap image in a series of different workflow options. As you can quickly see, the differences in file size do not always have the same relationship to image quality as you might expect.
Figure 37-1: Even when the final image quality is similar, the file sizes that are achieved with different workflow options can vary widely. In our production testing overall, Flash proves to be the first choice for achieving high image quality and small file sizes with traced or optimized bitmaps. The lesson we've learned is that unless we need a special effect that can't be created directly in Flash, it's best to import high-quality images (scaled appropriately for the movie size) directly to Flash and use the native Flash authoring tools to modify the image if needed. Reducing Vector ComplexityAlthough Flash provides robust tools for modifying the complexity of vector artwork, if you're creating artwork in other applications, you generally have some options for streamlining the artwork before bringing it into your Flash project.
Combining PathsYou can use the Pathfinder panel (View ⇨ Pathfinder) in Illustrator to control how overlapping paths are combined. Not only does this reduce the complexity of the path, but it also makes the graphic easier to edit or move. There are several different options for combining overlapping paths, including merging or cropping specific sections to create custom shapes.
To apply a command for combining separate paths, select the overlapping paths by Shift+clicking each object (or by dragging a selection box around all of the elements you want to modify). In the Illustrator Pathfinder panel, select an option to combine the overlapping elements and create a unified path shape.
Figure 37-2 shows three individual oval outlines in Adobe Illustrator (left) combined using the Merge option (center), and the Minus Back option (right) to create unified paths that describe different simplified polygons. Simplifying PathsIn addition to combining paths, you can simplify complex artwork by reducing the number of points used to describe the path (or a set of paths). The controls available for simplifying paths in Adobe Illustrator are slightly different than the controls in Macromedia Flash (as shown in Figure 37-3), but the final result is similar. Simplifying reduces the number of the points that define the lines and curves of a vector graphic to make the file smaller and easier to edit. The goal is to remove as many extraneous points along individual paths as you can without distorting the final shape too much.
Figure 37-3: The Simplify dialog box in Adobe Illustrator for modifying the points in the paths that describe a vector shape To simplify vector artwork, select the paths that describe the object and choose the Simplify command and settings available in your program of choice. The commands and settings for Illustrator are as follows:
|
Main Menu |
| 500 Juegos Gratis | 500 Giochi Gratis | 500 Jeux Gratuits | 500 Jogos Gratis | 500 Kostenlose Spiele |