Flash CS4 ActionScript 3.0 Tutorial
How to Create Compositing Effects with Layered Symbols Using Flash ActionScript
Blend Modes are commonly used in programs that contain layers of imagery. A Blend Mode is applied to the upper object. With the Blend Mode set, the upper and lower object interact with each other based on color and luminosity values. There are several Blend Mode options. The Normal Blend Mode has no effect on the layered images. For more information about the different Blend Modes, see topics, Add Blend Mode, Darken Blend Mode, Difference Blend Mode, Hard Light Blend Mode, Invert Blend Mode, Layer Blend Mode, Lighten Blend Mode, Multiply Blend Mode, Overlay Blend Mode, Screen Blend Mode, and Subtract Blend Mode. In this example we will demonstrate the Multiply Blend Mode.
Movie Symbol with instance name blendObj_mc
Movie Symbol with no instance name
Add two Movie Symbols to the stage and select one of the symbols with the Selection tool (v key). For information on creating a Movie Symbol, see topic, Movie Symbol Basics.
Open the Properties panel (Cmd/F3 (PC-Ctrl/F3)) and type in the name blendObj_mc for the Instance Name.
With the named symbol still selected, choose Modify > Arrange > Bring to Front.
Move the selected rectangle over the top of the lower rectangle.
Add a new layer called Actions to the top of the stack.
Option double-click (PC - Alt double-click) the keyframe in the Actions layer to open the ActionScript panel.
Copy/Paste the following code to the ActionScript panel.
blendObj_mc.blendMode = BlendMode.MULTIPLY;
Test your movie by pressing Cmd/Return (PC - Ctrl/Enter). The upper image blends with the lower image to create an enhanced version.
What is Multiply?
The Multiply Blend Mode multiplies the lower image pixels times the upper image pixels to create a darker final image. The saturation also increases in the composite image.
The upper object can be set to various blending modes to alter the effect. You can choose from several different Blend Modes.
Adjusting the Blend Strength
To soften the blend effect , change the alpha setting for the upper object.