Accessibility

TechNote (Archived)

Problems using movie clips in mask layers

Note: The information in this TechNote is specific to Macromedia Flash versions 5 and ealier. Macromedia Flash MX adds the ability to use movie clips as masks, animate those masking movie clips along a motion path and to control the mask layer with ActionScript. You can also create a mask layer dynamically based on an existing movie clip. The techniques in this technote will continue to work for Flash MX, but it would be simpler to create a path that followed a motion guide inside of a movie clip, then use that movie clip on the mask layer. This technique in Flash MX doesn't require using an external SWF. For complete details refer to the Macromedia Flash MX documentation.

Issue

Users can experience the following problems when using movie clips in mask layers in Flash 5 or earlier:

  • Movie clips in mask layers are not using the entire shape of the movie clip when used as a mask object.
  • Attempts to set or get ActionScript properties of a movie clip are not working when targeting movie clips on a mask layer.
Reason

When Flash creates the SWF during export or Test Movie mode, movie clips in mask layers are converted to graphic symbols. Flash uses the bottommost layer in the symbol as the masking shape. Other layers inside that symbol are not used for masking.

Since this symbol is assigned the graphic property on export, it cannot be targeted in the same way that a movie clip can.

Solution
  • If the entire shape of a movie clip is desired to use in a mask layer, all of the layers in the symbol should be combined into one layer.

    Select all of the art on the stage and delete multiple layers, leaving one layer to paste the art into.
  • If it is desired to use the Set Property on a movie clip in a mask layer to create a "dynamic mask", it would be best to make a movie clip consisting of a filled object that is the same color as the movie background color.

    This movie clip should be placed in a normal layer (not a mask layer) and will respond to ActionScript properties and expressions as expected.

AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support

Document Details

ID:tn_14264

Products Affected:

flash