<A HREF="/Tech" TARGET="_self"><IMG SRC="FT-Logo.gif" WIDTH=137 HEIGHT=70 BORDER=0></A>
Gif Transparency

     

Flash 3
The 3 gifs above were used to create the .swf file below using the Flash 3 program. The stockings on the left are not transparent. The center ones have the transparency index and the background color set to the palette color zero. The right ones have both the background and transparency index set to palette color one. Note, how the Flash 3 program does not make the background transparent when the transparency Index is not set to zero, as is the case with the image on the right, even though your browser has no problem.


Adjusting the Palette to get Transparency
The Gif palette is made of up to 256 positions each indexed to an RGB color. Flash 3 only recognizes the transparency of a gif when the transparency index is set to index 0 (the zero color location which is the upper left position in the color palette). If the transparency index is set to a color besides index 0 then you need to switch colors around.

To adjust the colors use your favorite bitmap editing program:

1) Create or use a new index color position matching the color of Index 0.
2) Replace the color areas using Index 0 with the new index.
    At this point the picture should look the same
    but Index 0 should now be unused.
3) Change Index 0 to a new color that is unique.
4) Use the new Index zero to fill in the area(s) you want to be transparent.
5) Export the Gif with transparency set to index zero.
    The gif will now import into Flash 3 with transparency recognized.

Flash 4
Note, the Flash 4 editor will create proper transparency no matter what palette color the transparency index has been set to. Both Flash 3 and Flash 4 .swf exports from Flash 4 will have gifs that are transparent.