Recipe 2.1. Importing Assets from Fireworks


Problem

You want to import assets from Fireworks into Flash.

Solution

Save the Fireworks PNG, and then use the File Import option in Flash to import the Fireworks assets.

Discussion

Because Fireworks and Flash are both Macromedia products, they have fairly good cross-support. That means that you can directly import Fireworks .png files (the native Fireworks format) into your Flash documents. When you import PNG content into Flash you get several benefits:

  • You don't have to worry about the hassle of saving to an intermediate step.

  • You can preserve vector content as vector when possible.

  • Flash can import parts of a PNG as vector and parts as rasterized bitmaps, thus providing the best possible balance between appearance, functionality, and file size.

  • Another benefit is that PNG can retain an alpha channelvery useful when you want to avoid having to mask areas in your image.

The first step is to create your Fireworks PNG. Even though Flash can import PNG content, it is important to keep in mind that it cannot import all the content in vector form. Although Flash will be able to import standard lines, solid fills, linear fills, gradient fills, and standard text as vector elements, it will need to rasterize other elements. For example, contour fills and text attached to a path will need to be rasterized (Flash will do that for you if you want) to maintain the same appearance in Flash as they have in Fireworks. You will not be able to use the Flash tools to change the color or shape of rasterized elements, so it is a good idea to carefully plan your PNG content while you author it in Fireworks.

After you've created the PNG and saved it, you can import it into a Flash document:

  1. Within Flash, open or create an .fla document.

  2. Choose File Import Import to Stage (or press Ctrl-R) if you want to import the content both to the library and to the stage at the same time. Otherwise, if you want only to import the content to the library choose File Import Import to Library. If you import to the stage, youll still be able to remove it from the stage if you want to at a later time.

  3. In the Import dialog box that displays, choose the PNG that you want to import and click Open.

  4. The Fireworks PNG Import Settings dialog box displays, prompting you to choose from the possible options. By default, the "Import as single flattened bitmap" option is checked. If you leave that option checked, all the content will be rasterized to a single bitmap.

    1. If you want to import the PNG as a single rasterized image, keep the "Import as single flattened bitmap" option checked.

    2. If your PNG contains any content that you want to keep vectorized, you should uncheck the "Import as single flattened bitmap" option. Doing so will enable the other options in the dialog box. The file structure has to do with how Flash should handle the imported content in terms of layers and symbols. The default setting is for Flash to import the content into a new movie clip symbol and keep the layers that are defined in the PNG. This is likely the behavior that you will want in most scenarios. Should you want to have the content imported into a single layer on the current timeline, select the "Import into new layer in current scene" option.

    3. Next, you get to select how you want Flash to handle shapes and text. The default setting is the "Rasterize if necessary to maintain appearance" option in both cases. That means that as long as Flash can import the content as vectors it will do so, but it will rasterize only that content that would not otherwise display properly. Typically, the "Rasterize if necessary to maintain appearance" option is the one you'll want. If you absolutely do not want any of the content to be rasterized, select the "Keep all paths editable" and "Keep all text editable" options. Be aware, however, that doing so can result in drastically different appearances. For example, text that has been attached to a path in the PNG will display as horizontal text in Flash unless it's been rasterized.

  5. Click OK.

  6. After the content is imported, it is a good idea to check the library for the new content. Often the newly imported symbols are not optimally named and organized. Any rasterized content is imported into bitmap symbols named Bitmap 1, Bitmap 2, and so on. And if you selected the option to import into a movie clip, a new movie clip is created and placed in a Fireworks Objects folder. Those movie clips will be named Symbol 1, Symbol 2, and so on. You should rename and reorganize the new symbols right away rather than waiting until later when it won't be so simple to locate them.

  7. Don't forget that you can simply copy and paste directly from Fireworks into Flashthis will "wrap" your PNG in a MovieClip automatically.




Flash 8 Cookbook
Flash 8 Cookbook (Cookbooks (OReilly))
ISBN: 0596102402
EAN: 2147483647
Year: 2007
Pages: 336
Authors: Joey Lott

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