Blending will not be new to people who have worked in applications such as Photoshop, but it is new to Flash. Basically, blending controls how colors interact when overlaid. You can set the Blend mode manually from the Property Inspector (Flash Professional 8 only) or in ActionScript, as you will see in Chapter 13. Following are the available options in the Blend drop-down from the Properties Inspector: normal This default option signifies that the pixel values of the blend image will override the pixel values of the base image. layer This option creates a temporary buffer for precomposition. This option is done automatically when there is more than one child in a movie clip, and Normal is not selected. darken This option compares pixel colors of the overlapping images and displays the darker of the two. multiply This option multiplies the color values of the corresponding movie clips where they overlap, usually creating a darker color. lighten This option compares pixel colors of the overlapping images and displays the lighter of the two. screen The exact opposite of the Multiply option, this option takes the complementing colors of the overlapping movie clips and creates a lighter color. overlay This option multiplies the colors of the overlapping movie clips while preserving both highlights and shadows. hardlight This option, similar to the Overlay option, will multiply or screen the two movie clips depending on their source color value. If it is darker than .5, it is multiplied. Otherwise, it is screened, or lightened. add This option adds the overlapping pixel colors of the two movie clips and sets a maximum color of 0xff. subtract This option subtracts the overlapping pixel colors of the two movie clips and sets a minimum color of 0x00. difference This option compares pixel colors of the overlapping images and subtracts the darker color from the lighter color. invert This option inverts the background. alpha This option applies the alpha of the foreground onto the background, but only if the parent movie clip has a blend mode of Layer set. erase This option will "cut out" part of the background with the foreground's alpha, but only if the parent movie clip has a blend mode of Layer set. Follow these steps to see blending at work: 1. | Create a new Flash document.
| 2. | Draw a red rectangle on the stage about 100x150 in size.
| 3. | Convert it to a movie clip called rec1MC.
| 4. | Draw a blue rectangle on the stage about 100x150 in size.
| 5. | Convert it to a movie clip called rec2MC and slide it over the red rectangle so they overlap somewhat.
| 6. | With the blue rectangle selected, go to the Properties Inspector and set Multiply as the Blend option.
| Notice that the part where both rectangles overlap is darker, as if the top rectangle were semitransparent. But this is not that case, as you would see if you put a text field with some text in it under the blue rectangle; the text will be completely obscured. Another new visual effect includes a list of a few visual filters. |