Reputation: 532
This could be an old matter. Reading Flash 8.0 Help I've pasted this code and check in runtime
var myBitmapData:BitmapData = new BitmapData(100, 80, false, 0x00FFFFFF);
var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
and it's ok. Changing false to true, the white rectangle is not seen as expected. I want that property to be applied in my library image called "Airplane" as IDlinkage, so, I added to the previous code the following line:
myBitmapData.loadBitmap("Airplane");
but when testing scene, it's shown this message : Error Static members can only be accessed directly through classes. My idea is to set white background image as transparent color. The image loaded to library is a PNG type and it has already transparent background but Flash ignores this, so I must set that with code. Help.
Upvotes: 0
Views: 155
Reputation: 532
Using Image Loader Component in Flash 8.0 solves the question :-/, it load the image with its properties, among them, the alpha channel settings.
Upvotes: 0