03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

See also<br />

_alpha (MovieClip._alpha property), _alpha (TextField._alpha property)<br />

blendMode (Button.blendMode property)<br />

public blendMode : Object<br />

The blend mode for the button. The blend mode affects the appearance of the button when it<br />

is in a layer above another object onscreen.<br />

Flash Player applies the blendMode property on each pixel of the button. Each pixel is<br />

composed of three constituent colors (red, green, <strong>and</strong> blue), <strong>and</strong> each constituent color has a<br />

value between 0x00 <strong>and</strong> 0xFF. Flash Player compares each constituent color of one pixel in<br />

the button with the corresponding color of the pixel in the background. For example, if<br />

blendMode is set to "lighten", Flash Player compares the red value of the button with the<br />

red value of the background, <strong>and</strong> uses the lighter of the two as the value for the red<br />

component of the displayed color.<br />

The following table describes the blendMode settings. To set the blendMode property, you can<br />

use either an integer from 1 to 14 or a string. The illustrations in the table show blendMode<br />

applied to a button (2) when superimposed on another onscreen object (1).<br />

Integer<br />

value<br />

356 <strong>ActionScript</strong> classes<br />

String value Illustration Description<br />

1 "normal" The button appears in front of the<br />

background. Pixel values of the button<br />

override those of the background.<br />

Where the button is transparent, the<br />

background is visible.<br />

2 "layer" Forces the creation of a temporary<br />

buffer for precomposition for the<br />

button. This is done automatically if<br />

there is more than one child object in a<br />

button <strong>and</strong> a blendMode setting other<br />

than "normal" is selected for the child.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!