normal
Used to specify that the pixel values of the blend image override those of the
base image.
overlay
Commonly used to create shading effects.
screen
Commonly used to create highlights and lens flares.
subtract
Commonly used to create an animated darkening dissolve effect between
two images.
Applying blending modes
The following procedure loads a dynamic image and lets you apply different blend modes to
the image by selecting a blending mode from a combo box on the Stage.
To apply different blending modes to an image:
1.
Create a new Flash document and save it as blendmodes.fla.
2.
Drag a ComboBox component instance onto the Stage and give it an instance name of
blendMode_cb.
3.
Add the following ActionScript to Frame 1 of the Timeline:
var blendMode_dp:Array = new Array();
blendMode_dp.push({data:"add", label:"add"});
blendMode_dp.push({data:"alpha", label:"alpha"});
blendMode_dp.push({data:"darken", label:"darken"});
blendMode_dp.push({data:"difference", label:"difference"});
blendMode_dp.push({data:"erase", label:"erase"});
blendMode_dp.push({data:"hardlight", label:"hardlight"});
blendMode_dp.push({data:"invert", label:"invert"});
blendMode_dp.push({data:"layer", label:"layer"});
blendMode_dp.push({data:"lighten", label:"lighten"});
blendMode_dp.push({data:"multiply", label:"multiply"});
blendMode_dp.push({data:"normal", label:"normal"});
blendMode_dp.push({data:"overlay", label:"overlay"});
blendMode_dp.push({data:"screen", label:"screen"});
blendMode_dp.push({data:"subtract", label:"subtract"});
blendMode_cb.dataProvider = blendMode_dp;
538
Animation, Filters, and Drawings
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?