To import a bitmap with transparency, create an alpha channel bitmap in your preferred editor (Adobe Fireworks, for example.) For information on working with alpha channels, see the documentation of your bitmap editor. Save the image as a 32-bit image, preferably PNG for best color fidelity. When you import the PNG file into Flash using File > Import, the alpha channel transparency is retained in Flash. If you're using Fireworks, see Using Fireworks and Flash Together for tips on exporting PNG files with transparent backgrounds for use in Flash.
Flash can also import transparent GIF89a images. See below for details. The JPEG format, however, does not support transparency.
It is possible to make the background of a SWF file transparent while it is being played in a browser. For complete details and an example, see Create a transparent background in a SWF file.
While it's possible to import bitmaps with transparent backgrounds into Flash, you can also remove the background after the image has been imported.
To remove the background for raster images, do the following:
Following are some known issues with preserving transparency in imported bitmaps.
Exporting or publishing static GIF with Transparent selected does not result in a transparent GIF. The background color is still visible.
Export as a looping 1-frame animated GIF with Transparent selected.
When you import transparent GIF images into Flash and placing them on the stage, the transparent image areas sometimes display as solid colors.
Flash imports GIF files incorrectly depending on the background and index color of the file. If imported GIF files have a different index color than the transparent color, a solid background results in the image display in Flash.
Create GIF images with the same transparency and index color for use in Flash. When saving or exporting images in GIF format, you have the option to set the transparency and index color of the image. When these colors are set to the same RGB values, Flash properly renders the background color as transparent. For detailed information on this procedure, see your image-editing application documentation.
Transparent areas are "ghosting" in PNG images in Flash when the monitor is running at 16-bit color display. Ghosting is a semi-transparent image appearing in an area that is expected to be transparent.
This issue is a symptom of the way Flash dithers colors for 16-bit display.
For displaying alpha areas over solid colors, Flash uses a single pixel value for the entire area of color. When displaying gradients or images, Flash uses a pattern of pixel values so that color changes are smoother. When there's an alpha channel over a solid color, Flash switches from a single pixel value to a pattern of pixel values. This switch causes the ghosting effect seen.
For a technical description of 16-bit color problems in Flash, see HTML colors are different from SWF colors.
There are three recommended workarounds to this issue:
Keywords: transparency; transparent; background; gif; bitmap; import; alpha channel; PNG; GIF; JPG; TIFF; wmode; 16 bit; ghost; ghosting; tn_12804