Creating a Feathered Mask
Flash CS4 ActionScript 3.0 Tutorial
How to Create a Mask with Soft Edges Using Flash ActionScript
Whenever you create a mask using a mask layer, the mask edges are sharp, not feathered. This method allows you to soft mask an object and reveal only specific portions of the original image.
Add two png images of the same size to your Assets folder. The Assets folder should be in the same directory as your Main.fla file.
Name one image Photo.png and the second one Mask.png. To reveal areas of the Photo.png, fill the Mask.png with any color. To hide sections, make the mask transparent. Be sure to feather the edges between the opaque and transparent portions of the mask. The images are saved as png files because png supports transparancy.
Create two documents in Photoshop. One is your image and the second is the mask. Both images should be the same size at 72 ppi. The mask should be opaque in the areas you wish to see the image.
Save images as Photo.png and Mask.png in your Project folder.
Open a new Flash document and name the default layer Content.
Choose File > Import > Import to Stage (Cmd/r (PC - Ctrl/r). Find your Photo.png and Mask.png images and choose Import (PC - Open).
Drag the Mask.png beside the photo image. Click the mask and press F8 to convert it to a Movie Symbol.
Click the Photo.png image and press F8 to convert it to a Movie Symbol.
Click the Photo symbol assign it an instance name of photo_mc in the Properties panel.
Click the Mask symbol assign it an instance name of mask_mc in the Properties panel.
Select both images and use the Align panel (Window > Align (Cmd/k (PC - Ctrl/k) to align them to the center of the stage.
Add a new layer at the top and name it Actions.
Option double-click (PC - Alt double-click) frame one of the Actions layer.
Copy/Paste the following code to the ActionScript panel.
Save your fla file in the project folder and name it Main.fla.
Publish your movie by pressing Cmd/Return (PC - Ctrl/Enter). The photo is masked using the soft edged mask file.