Skip to main content
Participant
May 26, 2015
Question

load bitmap from library

  • May 26, 2015
  • 1 reply
  • 265 views

I have loaded 4 black&white Illustrator Files into the library, which I would like to use them as masks. As an old time Director 8.5 user, I am thinking it should be almost similar in Flash by coping the black&white data as a mask with the CopyPixel() method. However, being a newcomer to Flash, I cannot figure out how to access these 4 images from the library into my ActioonScript, so that I could use the CopyPixel() method. In Director it use to be so simple

myImage = member*(5).image

or by member name

myImage = member("MyImage").image

once I had the image variable I could then call myImage.copyPixes(....)

is there anything similar to this?

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
May 26, 2015

assign the bitmpdata a linkage/class name (eg, BMPD).  then use:

var bmpd:BMPD=new BMPD();

var bmp:Bitmap=new Bitmap(bmpd);

addChild(bmp);