thoughts on art, interactivity, technology, design, culture & life
04.11.2009
My friend Justin recently asked me if I knew how to invert a mask in AS3. Technically of course this is not possible (at least as far as I know). You can however nest the DisplayObject you wish to mask and a copy of the original mask in a Sprite or MovieClip and use the LAYER and ERASE blend modes to create the desired effect.
You can get the source code for this HERE. I hope this helps.
Thanks again rachel. Lets hope in CS5 there’ll be a checkbox instead :P
I have no idea why I didn’t find this when I was looking for it a month ago, but this is EXACTLY what I was looking for. You wouldn’t believe the workaround I used to accomplish this. Thanks so much!
Hello,
Rachel
With the code friispray (Stuart Childs/ and Graffiti AS3 library (Ben Rhodes), I developed an new application to simulate digital graffiti.
Now in version 1.2, I would like to implement the option to use stencil. Therefore, I believe that through the function (inverse mask), I can create a palette of stencils. However, I am designer who sees a bit of AS3, but I’m not a programmer!
So, I liked to take a help of a professional. What kind of code you can suggest to put on a stage a shape (stencil), for when I paint on it, stay the effect of stencil?
I would be grateful for your assistance…
Cheers,
PatrĂcio Brito (Portugal)
P.s. – You can see my project here: http://vimeo.com/channels/34718