You can use threshold to do that.
var bitmap:BitmapData = BitmapData.loadBitmap("myPNG");
bitmap.threshold(bitmap, bitmap.rectangle, bitmap.rectangle.topLeft, '>',
0x, 0x);
maskClip.attachBitmap(bitmap, 1);
That will turn all pixels with some alpha to red and full alpha.
Dave
I have an irregularly shaped transparent png that I dynamically load.What I
need to do is to create a dynamic mask that is the same shape as the
non-transparent areas of the png.Is this possible using the Bitmap Data object?
_
Invite
2 matches
Mail list logo