To create a gradient mask in
Flash up to version 8, you also had to create a movie with a gradient in the background color above the mask, and if the background is also a picture, then creating such a mask becomes even more difficult. In the eighth version of Flash, the movie clips acquired the
cacheAsBitmap property, with which we got a performance benefit from FlashPlayer, with the programmed animation of a large number of movie clips on the scene, and the ability to create gradient masks is very simple. Let's sort out a couple of examples, make one by handles, setting
bitmap caching in the Properties panel

We will do another programmatically, pulling movie clips onto the scene from the library and applying
cacheAsBitmap to them. I will not paint anything here, because commented everything in the source, so download and understand.
')
Source code