Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading transparent gifs

Status
Not open for further replies.

ice78991

Programmer
Nov 20, 2006
216
I am trying to load a gif with some transparency over another image

The image has been prepared in fireworks using index transparency

It has been given a linkage name of pic0 in the library

Yet the following code renders nothing on the stage

createEmptyMovieClip("clip",1);
clip.attachMovie("pic0","pic_mc",2);
 
I think you can only attach MovieClips with attachMovie, not GIFs.

You can do this instead:
Code:
import flash.display.BitmapData;
createEmptyMovieClip("clip", 1);
var bmp:BitmapData = BitmapData.loadBitmap("pic0");
clip.attachBitmap(bmp, 2);

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top