Flash lets you import graphics files you've created with another image-editing program (like Adobe Illustrator or Photoshop) and then stored on your computer. After you import a graphics file, you can either edit the image it contains using Flash's tools and panels or just add it directly to your animation.
Table 10-1 (Incorporating Sound) shows you a complete list of all the different graphics file formats you can import into Flash.
As you see in the steps below, after you've imported a graphics file, Flash stores a copy of the image in the Library panel (Properties subpanels) so you can add as many instances of the image to your animations as you like.
Of course, there's no such thing as a free lunch. Depending on the format of your graphics file (see Incorporating Sound), Flash either pulls the image in as a collection of editable shapes and layers—which you can work with just as you work with any image in Flash—or as a flattened bitmap, which limits your editing choices a bit. (Import Options for Graphics gives you tips for working with flattened bitmaps.) Flash does its best to give you all the bells and whistles of the original file format. Flash really excels when you import a file from one of Adobe's Creative Suite programs, like Illustrator. As the example below shows, you get to choose the way Flash imports layers, shapes, and text. As a result, if you're importing Illustrator files, Flash lets you go ahead and modify the shapes (vector graphics) and edit the text after import.
Adobe Illustrator files are frequently saved for printing on paper using a color space called CMYK (Cyan-Magenta-Yellow-Black). Before you import these files, use Illustrator to convert them to the RGB (Red-Green-Blue) color space used by Flash. To check and change the color space setting in Illustrator, choose File→Document Color Mode. Less frequently, you may find Adobe Photoshop files using the CMYK color space. In Photoshop, to check and change the color space, go to Image→Mode→RGB.
Choose File→Import→Import to Stage.
Your standard file dialog box appears. If you're using a PC, it looks like Figure 10-3, for example.
Looking for an Adoble Illustrator practice file? Go to the Missing CD (www.missingmanuals.com/cds) and download either 10-1_Sports_Car.ai or 10-2_Stutz_Bearcat.ai.
In the "File name" field, type the name of the Adobe Illustrator (.ai) file you want to import (or, in the file window, click the file to have Flash fill in the name for you).
Use the drop-down menu at the bottom to see all the different types of files you can import. Initially the drop-down menu is set to All Formats.
Click Open.
The Import dialog box disappears, and then Flash displays an extra Import Settings window that lets you tell it how much editability you want to preserve: whether you want it to convert the original frames into Flash frames or Flash layers, pull in all the frames or just a few, include invisible layers or not, and so on. Figure 10-4 shows the Import Settings windows you see when you import files created with Adobe Illustrator.
Figure 10-3. You can import a graphic to the stage and the Library, as you see in the numbered steps, or just to the Library (by choosing File→Import→Import→to Library). Either way, you first have to tell Flash which file contains the graphic you want to import—and that's exactly what you do here, in the Import dialog box.
When you see the Import to Stage dialog box (Figure 10-4), click to select one or more of the following options, and then click OK.
Select Illustrator Artboard. You can create multiple artboards within an Illustrator file. They're similar to having multiple pages in a word processing document. Use the drop-down menu to choose which artboard (page) you want to import.
Check Illustrator layers to import. Flash gives you a scrolling list of all the layers in the Illustrator file, with icons and labels describing the contents of the layers. Place checkmarks next to the layers and artwork you wish to import. To the right of the scrolling list, you see Layer Import Options that change depending on the content of the layer.
On the right site of the Import window, you see "Layer import options for "<Path>":" or Group, or Text, or whatever you selected on the left. Here's your opportunity to fine-tune the import process. Suppose you have a drawing of a car. You can import the wheels as movie clips with the registration points centered, so you can create rotating wheels in your Flash animation. Here are examples of the import options:
Layer Import options for paths. If the layer includes lines and shapes, you can choose to import the content as an editable path, meaning you can change it later within Flash. Or you can import it as a bitmap, which gives you fewer editing options.
Layer Import options for text. You have three options for importing text. Choose "Editable text" if you want to edit or rewrite the text. Choose "Vector outlines" if you want to change the shapes of letters in the same way that you change the shapes of polygons and circles within Flash. Choose Bitmap if you're happy with the text as is and don't plan to change it other than perhaps tweaking the color and size a bit.
If you see a yellow triangle with an exclamation point (!), Flash is warning you that one of the graphic elements may not be imported as expected. For example, you may see an incompatibility warning if you try to import text that has been rotated in Illustrator. Click the layer, and Flash explains that the best option is to import the text as vector outlines. Once you fix the problem, the warning sign disappears.
Create movie clip. Use this option to instantly turn the graphics in the selected layer into a Flash movie clip symbol. Check the box, and then give the clip an Instance name that's used for the copy of the movie clip symbol that Flash places on the stage. If your Illustrator artwork uses effects like filters or blends, choose the "Create movie clip" option. In Flash, only movie clips can have filters and blends. At the bottom of the Import to Stage dialog box, you see options that affect all the layers you're importing.
Convert layers to: Flash Layers/Keyframes/Single Flash Layer. This option tells Flash to keep the layering structure of the original file intact, to place the content of each layer in a separate layer or keyframe. If you don't need to work with the image's layers separately, you can flatten the content of all layers onto a single Flash layer.
Place objects at original position. This option keeps the different elements in a graphic positioned the same way they were in Illustrator.
Set stage to same size as Illustrator artboard/crop area. Turning on this box automatically changes the Height and Width document settings in Flash to match the page settings in the Illustrator file you're importing.
Import unused symbols. Illustrator has a Symbols panel that's similar to Flash's Library. Turn on this option if you want to import all the symbols in the Illustrator panel, even if they don't appear in the document's page.
Import as a single bitmap image. Sometimes you're not interested in multiple layers, editable shapes, and editable text. All you want is a single picture in your Library that you don't want to change. Turn on this box to import the Illustrator file as a single, bitmap picture.
After you've made your choices and then clicked OK, the Import settings window disappears. Flash imports your file, placing it on the stage (or in multiple frames and layers, based on the options you selected above) and in the Library, as shown in Figure 10-1.