Summary
When possible, you should create graphics inside Flash. But sometimes you can't. There are times when you need to import graphics, such as when you have an existing graphic that would be impossible or difficult to recreate in Flash or when a graphic requires a raster file type, such as a photograph. When you're certain you want to import, Flash provides you with mechanisms to do so.
Q&A
-
Q. Importing Photoshop and Illustrator files looks pretty cool, but I don't have those programs. How can I test out some of what I learned this hour?
A. You can find some sample .ai and .psd files in the downloads section of the publisher's website.
-
Q. I'm having trouble importing images from a digital camera. I have some great shots of my potato chip collection, but they're huge after I import them. How can I resize them?
A. Because multi-megapixel cameras produce originals that can be thousands of pixels wide, you don't want to import these directly. First use an image editing program, such as Fireworks, to resize the image to fit comfortably on a normal screen size—that is, less than 1024x768 or 800x600. Taking a megapixel image and scaling it down inside Flash does not improve the sharpness and actually does the opposite if you don't select the Allow Smoothing option. Worse still, the file size will be huge. Don't do that; instead resize and optimize the image before importing!
-
Q. I have a photograph that I use as a raster graphic in my Flash movie. After I scan it into the computer and touch it up, what file format should I choose? There are so many.
A. Generally, you want to keep all your raster graphics in the highest-quality format possible before importing into Flash. One exception is when you use a tool, such as Fireworks, to produce an optimally compressed image. If you use an outside program to compress the image, make sure you don't recompress in Flash; leave the default setting Use Imported JPEG Quality. Alternatively, if you import a high-quality .pct, .bmp, or .png, you can compress it in Flash until you're satisfied with the compression level. JPEGs are all right, but they always have some compression that could result in artifacts. GIFs are not a good alternative because they can't have more than 256 explicit colors. Changing the file format of an existing image never makes a graphic better and potentially makes it worse. You should start with the best quality possible, and then reduce it as the very last step.
-
Q. How do you determine how much one graphic is contributing to the final movie's file size?
A. If it's a raster graphic, you can explore the Bitmap Properties dialog box, which tells you exactly how big a graphic is. With vector graphics, determining the size is more difficult. Ultimately, you should copy the graphic into a new file and export a .swf of that file by selecting File, Export. You can look at the file size. Sometimes it's not so important how much one graphic is contributing, especially if it's an important graphic; your concern should always be to not add to the file size unnecessarily.
-
Q. I have a fairly simple Illustrator file graphic that I would like to import into Flash. It's impossible to redraw in Flash, so I have to import it, right?
A. If the file is simple, it should be possible to create it in Flash. Make sure you're fully exploiting the potential of Flash. Read Hour 2, "Drawing and Painting Original Art in Flash," again, if necessary. Of course, if you have to import the image, do so. You might still have luck if you first export it from Illustrator as a .swf before importing.