Hey everyone
I’m trying to use the drawMask property of an Image, but I’m not sure how to.
I’m trying to draw an image on top of another one, and only show the pixels of the first image that are overlapping the second one. Here is a mockup to show what I want:
I have a face background (the yellow one), and I’m adding a mouth image at a somewhat random position on top of it. I want to use the background face as a clipping mask for the mouth to produce something like the 3rd picture.
What I’m doing is:
var clippingMask:BitmapData = FP.getBitmap(Embed.MASK_FACE);
mouth.drawMask = clippingMask;
The problem is the face mask is positioned at the 0,0 of the mouth. How can I offset it to the position of the real background face so it can show only the mouth part that I need?
Or maybe I’m going in the wrong direction and there is another way to achieve what I want?
Thanks in advance everyone~