I need to find a way to copy a masked bitmap. I have a bitmap on stage, and a user drawn sprite that acts as a mask. I need to capture/copy the masked area bitmap, maintaining the transparency created by the masking to eventually encode as a png.
I could find no documentation on how to accomplish this using copyPixels(), or any other directions.
Thanks in advance for any assistance –
b
I’ve made a simple test that seems to work:
I’m creating a BitmapData and using the draw() method to make a clone.
The key thing seems to be the last two arguments in the BitmapData constructor.
After I pass the holder.width and holder.height, I specify I want the bitmapData to be transparent (true) and have the fill full transparent white (0x00FFFFFF) in ARGB (alpha-red-green-blue)
Hope this helps 🙂