This quicktip covers a simple masking method with animation in flash. Click read more for the lo-fi version. Leave a comment and let me know if you have any other suggestions for quick tips!

Alrighty so lets fire up flash and make an animated mask!

First up lets make two layers. Insert a keyframe (right click > Insert keyframe) in frame 1 of both layers and insert a frame (right click > Insert frame) This makes our animation 10 frames.

In layer 1 frame one (with the keyframe) drag an image from your library onto the stage.

In layer 2 keyframe 1 draw a skinny rectangle

In layer 2 insert another keyframe at frame 10 (right click > Insert Keyframe) With the keyframe selected move the rectangle to the other side of the stage.

Right click in the middle of layer 2 and create a motion tween (right click > create motion tween)

Right click on name of layer 2 and select mask

Your stage should now only show the wood background where the rectangle is. Hit Apple + Enter to preview your animation!

Now you can save your animation and go to file>Publish and flash will export an .swf .html and .js file so you can upload it to the web!

Download the source files here: Flash-Mask.zip

Did you like this quicktip? Leave a comment and let me know what you think!