Flash Masking Animation with ActionScript 3 (1)
Actually the masking can be applied at runtime with Flash ActionScript 3. This example shows how to use simple AS3 to accomplish the result.
Flash Masking Tutorial Content
The flash masking animation effect is shown as above.
The layers and objects are created and converted to symbol as usual. Then apply masking effect at runtime with Flash ActionScript.
Flash ActionScript Codes:
// Use cacheAsBitmap to convert mcBall and mcCircle to bitmap at runtime
// Set cacheAsBitmap of both mcBall and mcCircle (mask) to true
// to get the transparency effect
mcBall.cacheAsBitmap = true;
mcCircle.cacheAsBitmap = true;
// Apply Mask
mcBall.mask = mcCircle;
Download Flash Source File:
This Flash Animation tutorial shows how to use Flash ActionScript to create a mask layer at runtime.