I am trying to copy the pixels of a bitmap into BitmapData at a transparency of lets say .5 but i can’t seem to find any reference to this anywhere on google or here!
i have my standard copy pixel code
_bitmapData.copyPixels(_bitmaps.vault[BitmapNames.BITMAPNAME], SCREENRECT, _drawPoint, null, null, true);
I can see that the first null value i pass is a BitmapData labelled alphaBitmapData:BitmapData so i’m assuming it has something to do with that, but i cant work it out!
Any help would be appreciated, cheers!
I have accepted Will Kru’s answer as the answer (though only theory based) below is the code used to put the method behind the madness!!
var alphaBitmap:BitmapData = new BitmapData(width, height, true, toARGB(0x000000, (.5 * 255)));_bitmapData.copyPixels(_bitmaps.vault[BitmapNames.BITMAP], _drawRect, _drawPoint, alphaBitmap, null, true);toARGB function found here alpha + RGB -> ARGB?