348
ActionScript classes
blendMode (Button.blendMode property)
public blendMode : Object
The blend mode for the button. The blend mode affects the appearance of the button when it
is in a layer above another object onscreen.
Flash Player applies the
blendMode
property on each pixel of the button. Each pixel is
composed of three constituent colors (red, green, and blue), and each constituent color has a
value between 0x00 and 0xFF. Flash Player compares each constituent color of one pixel in
the button with the corresponding color of the pixel in the background. For example, if
blendMode
is set to
"lighten"
, Flash Player compares the red value of the button with the
red value of the background, and uses the lighter of the two as the value for the red
component of the displayed color.
The following table describes the
blendMode
settings. To set the
blendMode
property, you can
use either an integer from 1 to 14 or a string. The illustrations in the table show
blendMode
applied to a button (2) when superimposed on another onscreen object (1).
Integer value
String value
Illustration
Description
1
"normal"
The button appears in front of the
background. Pixel values of the
button override those of the
background. Where the button is
transparent, the background is
visible.
2
"layer"
Forces the creation of a
temporary buffer for
precomposition for the button.
This is done automatically if there
is more than one child object in a
button and a
blendMode
setting
other than
"normal"
is selected
for the child.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...