Inverted mask flash

I was looking for an easy way to invert a mask in flash. Its just amazing how it doesn't have this feature.

I just need to draw a shape and everything below (in layers) will not appear.

Any suggestions?

+4
source share
2 answers

To create an inverted mask in code:

private function createInvertedMask(mcToBeMasked:MovieClip):void { mcToBeMasked.blendMode = BlendMode.LAYER; var invertedMask:Sprite = new Sprite(); invertedMask.graphics.beginFill(0x0, 1); invertedMask.graphics.drawRect(640, 395, 630, 395); invertedMask.blendMode = BlendMode.ERASE; mcToBeMasked.addChild(invertedMask); } 

To create an inverted mask in the Flash Professional IDE Select the properties panel of the image you want to mask, select "Show" → "Blend" → "Layer", then select your mask and select "Display →" Blend "->" Erase ", you you will see something like this: enter image description here

+5
source

NOTE. Remember that this works inside a movie clip (i.e. you created an inverted movie clip of an animation mask that erases itself, etc.); the clip in which it is embedded MUST BE INSTALLED IN BLENDMODE: LAYER ALSO, otherwise the overall effect will be ignored - I hope this helps!

+1
source

Source: https://habr.com/ru/post/1300784/


All Articles