I have a BitmapData object created dynamically that contains user-drawn shapes. I then attach that BitmapData object to a MovieClip via a Bitmap object and set that MovieClip as a mask to another MovieClip. The mask works but the whole bounding rectangle of the BitmapData is acting as the mask. But I want to exclude the transparent portion from the mask so only user-drawn shape can be set as mask. Can anyone tell how to achieve that? Thanks.
I see you already solved it (in the comments section).
Posting it as an answer.
Set BOTH movieclip and mask cacheAsBitmap to true.
i.e.:
movieclip.cacheAsBitmap = true;
movieclip_mask.cacheAsBitmap = true;
The thing you need to do is turn the bitmap caching on.
myMc.cacheAsBitmap = true;
if I remember correctly ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With