Gradient Mask in Flash Actionscript 3.0
Creating a gradient mask in Flash Actionscript 3.0 is actually pretty easy.
1) Create your masking graphic and apply a gradient fill (I’m assuming you know how to make this masking graphic – if not, you probably need a different tutorial first)
2) Add this line to your main timeline:
cliptomask.mask = maskinggraphic;
Where cliptomask is the instance name of the movie clip you are masking and maskinggraphic is the instance name of the masking graphic.
3) Add these two lines directly underneath
cliptomask.cacheAsBitmap = true;
maskinggraphic.cacheAsBitmap = true;
And that’s it! Let me know if you run into any issues…
October 28th, 2009 at 11:34 am
Wow , Its so simple , I never tried it .
Thanks