Flash AS3 Tutorials Center | Interesting Flash Animation Tutorials | Valuing Flash Animation Tutorials | Flash ActionScript and Animation Home

AS3 Beginner Tutorials | AS3 Basic Lessons | AS3 Valuing Courses | AS3 Components Tutorials | AS3 and PHP Interaction Tutorials
AS3 Practical Tutorials | AS3 Animation Techniques | AS3 Transition Effects Tutorials | AS3 Download Upload Files | AS3 Particle Systems
Communication Between Flash Movies with AS3 | AS3 and JavaScript interaction | AS3 Matrix Transformation | AS3 Physics Simulation Tutorials

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.

Please update flash player to view this Flash ActionScript tutorial!

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 masking animation

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:

Flash Source File 07-simple-mask.fla

Remarks:

This Flash Animation tutorial shows how to use Flash ActionScript to create a mask layer at runtime.