Importing and Copying Bitmaps


Flash has the option to import bitmaps directly to the document Library, in addition to the standard option of importing to the document Stage. When a bitmap file is imported to the Stage, it will be added to the Library as well. To import a bitmap into Flash, follow these steps:

  1. If you want to import an item to the Stage, make sure that there's an active, unlocked layer.

    If no layer is available for placement of the imported item, the Import to Stage command is dimmed and you will only be able to use the Import to Library option.

  2. Choose File ð Import to Stage (Ctrl+R or z+R) or File ð Import to Library.

    The Import (or the Import to Library) dialog box opens (shown in Figure 16-4).

  3. Navigate to the file that you'd like to import, select it, and click the Import or Import to Library button.

image from book
Figure 16-4: The Import dialog box as it appears on Mac OS X. You can import multiple files in the same batch by selecting them from the file list before clicking Import.

The important difference between Import and Import to Library is that the latter option places the asset directly into the document Library without placing an instance on the Stage.

Because Flash offers full support for the PNG image format (including lossless compression and multilevel transparency and some Fireworks filters), PNG is an ideal format for images that you intend to import into Flash. The PNG format has two types: PNG-8 and PNG-24. Generally, only PNG-24 images support 24-bit color and an alpha channel, but the file sizes can often be prohibitive. Macromedia Fireworks makes it possible to create PNG-8 files with transparency for import to Flash.

Cross-Reference 

We discuss the PNG format in depth in Chapter 36, "Working with Raster Graphics," which is included as a PDF file on the CD-ROM.

Caution 

When you are using bitmap images with transparent areas, display problems can occasionally occur with certain color settings and file types. For troubleshooting assistance, refer to the Macromedia TechNote on "Transparency support in Flash" at: www.macromedia.com/support/flash/ts/documents/transparent_bitmaps.htm.

Importing Sequences

When using the Import to Stage option, if you select an image from a series of images in the same storage location that include sequential numbers at the end of their filenames, Flash prompts you to import the files as a sequence. If that's what you want to do, click Yes in the dialog box (shown in Figure 16-5) to have Flash import all the files and place them in numeric sequence on successive keyframes of the current Timeline. Otherwise, click No, and only the single file that you've selected will be placed on the Stage.

image from book
Figure 16-5: You can import images in a numbered sequence and place them on successive keyframes automatically using the Import to Stage option.

If you are importing a series of stills to be used sequentially to create animation (stills from a video sequence, for example), this feature can save a lot of the time you would spend placing and ordering images manually. The most efficient workflow is to create a Movie Clip symbol before importing the images, so that the sequence can be placed directly on the Movie Clip timeline. This method creates an animated element that can easily be placed anywhere in your Flash project. If you have already imported a sequence to the Main Timeline and decide that it would be more easily managed as a symbol, simply create a Movie Clip, and then cut the images from the Main Timeline and paste them into the Movie Clip timeline.

Web Resource 

For more coverage on how to create bitmap sequences from QuickTime video, go to the archived Flash MX Bible (Wiley, 2002) Chapter 41, "Working with QuickTime," available online at www.flashsupport.com/archive.

Although sequential import is not an option when using Import to Library, it is possible to manually select multiple images for import while using either of the Import dialog boxes. In order to bring more than one file into Flash in the same batch, Shift+click to select multiple items in sequence or use Ctrl+click (or z+click) to select multiple nonsequential items in the file list of the Import dialog box.

Copying and Pasting a Bitmap into Flash

Here's how to use the Clipboard to import a bitmap into Flash:

  1. Copy the bitmap from your image-editing application to your Clipboard.

    Most programs support the Ctrl+C or z+C shortcut key.

  2. Return to Flash and make sure that you have an active, unlocked layer that you can paste the bitmap into; this can be on the Main Timeline or on any symbol timeline.

  3. Paste the bitmap onto the Stage by choosing Edit ð Paste in Center from the menu (Ctrl+V or z+V).

Caution 

When you are pasting a selected area from Photoshop, any transparency (alpha channel) is ignored or will render with unpredictable patterns that you'll have to mask out in Flash. The bitmap name will also be replaced with a default numbered asset name. In most cases, results will be much more consistent if you import the image file rather than copying and pasting it into Flash.




Macromedia Flash 8 Bible
Macromedia Flash8 Bible
ISBN: 0471746762
EAN: 2147483647
Year: 2006
Pages: 395

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net