How to cut a "hole" inside a rectangular Sprite to see the Sprite underneath? (ActionScript 3)
Posted
by Zando
on Stack Overflow
See other posts from Stack Overflow
or by Zando
Published on 2010-02-03T22:27:56Z
Indexed on
2010/03/31
15:03 UTC
Read the original article
Hit count: 361
Everytime I google this question I see confusing information about masks and blends, none of which seems to directly apply to what I think should be an easy thing...
There are three Sprites involved here...the lowest layer sprite is pretty much a background. I want to overlay a translucent Sprite on top of the background and then I want the third, top-most Sprite to act as a hole, so that the area inside the third Sprite is completely transparent, so that the background sprite is completely visible.
How would I go about doing this dynamically (i.e. dynamically drawing the masking sprite and hole using the Actionscript graphics calls)?
© Stack Overflow or respective owner