Thursday, August 25, 2005

Flash® 8 - MovieClip.blendMode

In Flash® 8, the MovieClip class supports a new property called "blendMode". Using "blendMode" you can control how MovieClips are merged together or blended. In this example I use a V2 ComboBox to modify the "blendMode" property of the IFBIN Logo against a gradient.



There are 14 supported blendModes (1-14) and they all create wildly different effects when combined with one another. Here are the complete set of supported blendModes:

BlendModes for Flash 8:

1 - "normal"
2 - "layer"
3 - "multiply"
4 - "screen"
5 - "lighten" >> Looks like neon over a gradient!
6 - "darken"
7 - "difference"
8 - "add"
9 - "subtract"
10 - "invert"
11 - "alpha"
12 - "erase" >> Great for masking content
13 - "overlay"
14 - "hardlight"

These values can be set as a number or a string as follows:

//the following lines do the exact same thing.

myClip.blendMode = 3

myClip.blendMode = "multiply"


In Flash® by Example we have 14 examples covering each different "blendMode" as each is important to understand given its unique and subtle effect/differences. This example will ship with full source and documentation within Flash® by Example.

More to come,

Ted ;)

0 Comments:

Post a Comment

<< Home