Specifying publish settings for GIF files

GIF files provide an easy way to export drawings and simple animations for use in web pages. Standard GIF files are simply compressed bitmaps.

An animated GIF file (sometimes referred to as a GIF89a) offers a simple way to export short animation sequences. Flash optimizes an animated GIF file, storing only frame-to-frame changes.

Flash exports the first frame in the SWF file as a GIF file, unless you mark a different keyframe for export by entering the frame label #Static in the Property inspector. Flash exports all the frames in the current SWF file to an animated GIF file unless you specify a range of frames for export by entering the frame labels #First and #Last in the appropriate keyframes.

Flash can generate an image map for a GIF file to maintain URL links for buttons in the original document. You use the Property inspector to place the frame label #Map in the keyframe in which you want to create the image map. If you don't create a frame label, Flash creates an image map using the buttons in the last frame of the SWF file. You can create an image map only if the $IM template variable is present in the template you select. See Creating an image map.

To publish a GIF file with your Flash file:

  1. Do one of the following to open the Publish Settings dialog box:
    • Select File > Publish Settings.
    • In the Property inspector for the document (which is available when no object is selected), click the Settings button.

    Note: To create a publish profile for the publish settings that you'll specify, see Using publish profiles.

  2. On the Formats tab, select the GIF Image type. In the File text box for the GIF image, either use the default filename, or enter a new filename with the .gif extension.
  3. Click the GIF tab to display the file settings.
  4. For Dimensions, enter a width and height in pixels for the exported bitmap image, or select Match Movie to make the GIF the same size as the Flash SWF file and maintain the aspect ratio of your original image.
  5. Select a Playback option to determine whether Flash creates a still (Static) image or an animated GIF (Animation). If you select Animation, select Loop Continuously or enter the number of repetitions.
  6. Select an option to specify a range of appearance settings for the exported GIF file:

    Optimize Colors removes any unused colors from a GIF file's color table. This option reduces the file size by 1000 to 1500 bytes without affecting image quality, but slightly increases the memory requirements. This option has no effect on an adaptive palette. (An adaptive palette analyzes the colors in the image and creates a unique color table for the selected GIF file.)

    Interlace incrementally displays the exported GIF file in a browser as it downloads. Interlacing lets the user see basic graphic content before the file has completely downloaded and may download the file faster over a slow network connection. Do not interlace an animated GIF image.

    Smooth applies anti-aliasing to an exported bitmap to produce a higher-quality bitmap image and improve text display quality. However, smoothing may cause a halo of gray pixels to appear around an anti-aliased image placed on a colored background, and it increases the GIF file size. Export an image without smoothing if a halo appears or if you're placing a GIF transparency on a multicolored background.

    Dither Solids applies dithering to solid colors as well as gradients. See Dither options in step 8.

    Remove Gradients, turned off by default, converts all gradient fills in the SWF file to solid colors using the first color in the gradient. Gradients increase the size of a GIF file and often are of poor quality. If you use this option, select the first color of your gradients carefully to prevent unexpected results.

  7. Select a Transparent option to determine the transparency of the application's background and the way alpha settings are converted to GIF:

    Opaque makes the background a solid color.

    Transparent makes the background transparent.

    Alpha sets partial transparency. You can enter a Threshold value between 0 and 255. A lower value results in greater transparency. A value of 128 corresponds to 50% transparency.

  8. Select a Dither option to specify how pixels of available colors are combined to simulate colors not available in the current palette. Dithering can improve color quality, but it increases the file size. Select from the following options:

    None turns off dithering and replaces colors not in the basic color table with the solid color from the table that most closely approximates the specified color. Turning dithering off can result in smaller files but unsatisfactory colors.

    Ordered provides good-quality dithering with the smallest increase in file size.

    Diffusion provides the best-quality dithering but increases file size and processing time. It also works only with the web 216 color palette selected.

  9. Select a Palette Type to define the image's color palette:

    Web 216 uses the standard 216-color, browser-safe palette to create the GIF image, for good image quality and the fastest processing on the server.

    Adaptive analyzes the colors in the image and creates a unique color table for the selected GIF file. This option is best for systems displaying thousands or millions of colors; it creates the most accurate color for the image but increases file size. To reduce the size of a GIF with an adaptive palette, use the Max Colors option in step 10 to decrease the number of colors in the palette.

    Web Snap Adaptive is the same as the Adaptive palette option except that it converts very similar colors to the web 216 color palette. The resulting color palette is optimized for the image, but when possible, Flash uses colors from the web 216 palette. This produces better colors for the image when the web 216 palette is active on a 256-color system.

    Custom specifies a palette that you have optimized for the selected image. The custom palette is processed at the same speed as the web 216 palette. To use this option, you should know how to create and use custom palettes. To select a custom palette, click the Ellipsis (...) button to the right of the Palette box at the bottom of the dialog box and select a palette file. Flash supports palettes saved in the ACT format, exported by Macromedia Fireworks and other leading graphics applications; for more information, see Importing and exporting color palettes.

  10. If you selected the Adaptive or Web Snap Adaptive palette in step 9, enter a value for Max Colors to set the number of colors used in the GIF image. Choosing a smaller number of colors can produce a smaller file but may degrade the colors in the image.
  11. Click OK to save the settings with the current file.