Being Prepared for Common Problems


Flash retains existing JPEG compression levels on any imported JPEG image, but, if specified in the Bitmap Properties dialog box, it applies additional JPEG compression (set in the Quality field) when the movie is published or exported. Recompressing an image that has already been compressed usually leads to serious image degradation, due to the introduction of further compression artifacts. When importing JPEGs, you'll note that the Use imported JPEG data check box is selected by default in the Bitmap Properties dialog box. This is the preferred setting because recompressing a JPEG is generally detrimental to image quality.

Tip 

If you import JPEG images, make sure that you either test the results of further JPEG compression or select the Use imported JPEG data check box in the Bitmap Properties dialog box, which is accessible from the Flash Library.

You can apply compression settings to each individual bitmap in the Library with the Flash Bitmap Properties dialog box to determine the quality that you need before you use the general JPEG settings in the Export Movie or Publish Settings dialog box. Any Quality defined in the Bitmap Properties dialog box will override the JPEG Quality in Publish Settings. To apply the Publish Settings compression to an image, you must select the Use document default check box in the Bitmap Properties dialog box.

Cross-Reference 

We discuss JPEG export settings for Flash movies (.swf) in greater detail in Chapter 21, "Publishing Flash Movies."

Note 

There was a known problem in Flash MX, referred to as bitmap shift, in which the position (and even colors) occasionally shifted from one instance to another of the same image. Flash MX 2004 resolved this small but important workflow issue.

Cross-Browser Consistency

We've received more than a few queries about image formats and Flash's capability to transcend issues of browser inconsistency, so here's the answer. Many image formats, such as PNG, are not supported across all browsers. When you import such an image format into Flash and publish or export to the SWF format, you have accomplished browser independence — because the Flash movie (.swf) is browser independent and the image has been encapsulated within the SWF format. (The image is not being sent to the browser in the imported format and then magically empowered to display.) Conversely, if you export any Flash document (.fla) to PNG or to any other format that's subject to cross-browser inconsistency, browser independence is lost.

JPEG Rotation

This is a tricky problem to analyze. When animation that includes a bitmap is rendered and the image is displayed at an angle, it can be distorted. The manner of distortion changes depending on whether it was rotated in Photoshop and imported with the angle, or if it was imported into Flash on the square and subsequently rotated.

  • When rotated in Flash, hard edges, such as text or high-contrast areas of an image, may appear choppy — as if they had been cut out with pinking shears. Yet, when zoomed, this effect is less problematic.

  • When rotated in Photoshop, prior to import into Flash, some hard edges are less choppy. However, the file size will increase (to accommodate the larger overall shape), and the background will become a fixed color unless it is imported in lossless PNG format. A flutter or pixel-stepping pattern may occur along the edges of the transition between the background and the image. Straight lines and text will appear smoother and more acceptable at 100-percent scale, but at 200-percent zoom, text looks worse than the same image rotated in Flash.

Before rotating a bitmap in Flash, you should perform a few tests to see how your specific bitmap will be affected by the combination of compression, zoom, smoothing, and rotation (either in or out of Flash). Your choices and your decision will vary, subject to the content of the bitmap and the manner in which it will be used within Flash.

New Feature 

Overall, bitmap smoothing is greatly improved in Flash 8. Even rotated images look much cleaner and are less likely to be jagged than in older versions of Flash. In most of our tests, the results were actually best when images were rotated in Flash rather than rotated in an image-editing program before import.

Applying Alpha, Color Effects, and Filters to Bitmaps

A bitmap has some of the same advantages as the native Flash symbol types: It is automatically added to the Library when you import it, and instances can be dragged onto the Stage and even used in Motion tweens. However, Filters can't be applied to raw bitmaps and the Color (and Alpha) Effects are not available in the Property inspector when you select a bitmap instance. If you wish to change the alpha settings or color tint of an imported image or apply any of the new Flash 8 Filters, you have two easy options:

  • Convert the bitmap into a Flash symbol type (F8) — use Movie Clip or Button symbol behavior if you want to use Flash Filters. You can use the same name for the symbol instance as the original bitmap image. Filters will be available in the Filters tab, and Color Effect settings will be available in the Properties tab of the Property inspector when you select the new (converted) symbol instance. Unfortunately, if you have placed other instances of the raw bitmap in your Flash file before nesting the bitmap in a symbol, not all of the instances of the bitmap will be automatically linked to the symbol you create, and you cannot use the Swap button to insert a Flash symbol instance in place of a bitmap instance.

    Tip 

    Library folders are very helpful for managing large sequences of images that need to be converted into symbols. We usually create a "Bitmap source" folder and an "Image symbol" folder to make it easy to keep track of where all the assets are. Keep in mind that edits to the bitmap will be visible in the Flash symbol, but changes to the Flash symbol will not change the original bitmap.

  • You can use Timeline Effects to add alpha or color changes to a bitmap instance. Flash still converts the image into a Graphic symbol before the Effect is applied, but you don't have to worry about doing it as a separate step.

Of course, using an external image-editing program is always an option, too. The features we describe in the next section can assist you if you plan to edit images outside of 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