Importing Assets
You can import graphics, sound, and video into Flash. With the exception of video, assets are actually imported into FLAs, not just linked. In other words, after importing a graphic, you can delete it from your hard drive. It will still be available in the FLA file and generated SWF.
SWF files can only contain JPEG and PNG graphics and MP3 audio (and some video formats, which are discussed in a later chapter). However, you can import many other standard types, and Flash will convert them into JPEGs, PNGs, and MP3s for you.
Let’s import several assets from a layered Photoshop file (Flash allows you to do this with Illustrator files, too).
- Copy the Chapter_02 Project Files folder from the DVD to your hard drive.
- Choose File > Import > Import to Library. Select the file world.psd from the Chapter_02 Project Files folder and click Import to Library.
- In the Import to Library dialog, select the plane layer, hold down the Shift key, and then select the water layer. You should have 5 layers selected.
- Select the “Create movie clips for these layers” check box. Leave Instance name and Registration unchanged
- Under Publish settings, choose Lossless from the Compression drop-down menu.
- Deselect the layer named cursor.
- Click OK to add the files to your project’s library.
This converts all the Photoshop layers into PNGs. If you’re animating for the Web and worried about file size, you might want to experiment with the Lossy option, which allows you to set a percentage-based quality setting (100 is full quality; zero is lowest quality).
You don’t want to import this layer into Flash as it is not used in the final animation. Fortunately, when you import a layered Photoshop file, Flash allows you to choose which layers you want to import. We sometimes use layered Photoshop and Illustrator files as image libraries with each image on a separate layer. We then import the whole file into Flash but only select layers containing images we want.