Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
Let me now review the scripts for applying Blending Modes. Blending Modes involve combining the colors of one image, the base image, with the colors of another image referred to as the Blend Image, to produce a third image and then display the results on the screen. Each pixel value in an image is processed with the corresponding pixel value of the other image to produce a pixel value for that same position in the result. I have an example here in which I've applied a Blending Mode to the photograph. You can see that where the photograph and the purple rectangle intersect I get this different pixel result here. If we look at the script for this I've applied the BlendMode.MULTIPLY to my beach photograph right here that I've converted to a movie clip. Every display object in Flash has a BlendMode property that can be set to one of these blending modes in this list. These are all constants defined in the BlendMode class. Alternatively you can use the String values in parentheses that are the actual values of the constants. Let me introduce each of these BlendModes and then provide some demonstrations using my beach photo. The BlendMode.ADD is commonly used to create an animated lighting dissolve effect between two images. ALPHA is commonly used to apply to transparency of the foreground on the background. DARKEN is used to superimpose type. DIFFERENCE is used to create more vibrant colors. Let's go ahead and demonstrate DIFFERENCE in our Flash file here. Notice that these properties are all in caps. And if you misspell them like I've done here notice that they don't go into the blue color. There we go. That's correctly spelled and let's preview the DIFFERENCE BlendMode. The ERASE mode is used to cut out or erase part of the background using the foreground alpha. Let's try that again. ERASE, Control, Test Movie. The HARDLIGHT mode is commonly used to create shading effects. Let's try that one. And this is the result of HARDLIGHT. Kind of an interesting effect there. The INVERT BlendMode is used to invert the background. The LAYER is used to force the creation of a temporary buffer for a precomposition for a particular display object. LIGHTEN is commonly used to superimpose type. MULTIPLY is commonly used to create shadows and depth effects. Let's try MULTIPLY here and the results of MULTIPLY. That's the first one that I showed you. The NORMAL mode is used to specify the pixel values of the BlendImage, which will override those of the base image. OVERLAY is used to create shading effects. The SCREEN BlendMode is commonly used to create highlights and lens flares. Let's try demonstrating the SCREEN BlendMode here. Notice that each one is going to give you a different result and sometimes the results are a bit unpredictable. The SHADER BlendMode is used to specify that a pixel bender shader is used to create a custom blending effect. For more information about using shaders see the ActionScript Help, Working with Pixel Bender Shaders. And the BlendMode SUBTRACT is commonly used to create an animated darkening dissolve effect between two images. So there you have a quick introduction to the available BlendMode properties and some examples of several BlendModes. Let's now move on to the next movie and review how to apply Filtering to your display objects using ActionScripting.
| Course: | Adobe Flash ActionScript 3.0 for Designers |
| Author: | James Gonzalez |
| SKU: | 34060 |
| ISBN: | 1-935320-82-3 |
| Release Date: | 2009-11-09 |
| Duration: | 9.5 hrs / 101 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |