Gradient Masks in AS3

You can do gradient alpha masks in Flash CS3/4, but not without doing a bit of actionscript. I beleive this works in both AS2 and 3, this works in AS3 – not bothering to test AS2.

// set both the mask clip and the target to be masked to true
maskMC.cacheAsBitmap = true;
targetMC.cacheAsBitmap = true;

// in code, set the mask of the targetMC to be the maskMC.
targetMC.mask = maskMC;
Tech Reference:

Leave a Reply

Your email address will not be published. Required fields are marked *

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑