Flash Cookbook - Colors - brightness of movieclip
Now we learn how to set the brightness of a movieclip. It's quite easy and it will be our first step into colormatrixfilter.
function setBrightness(target:MovieClip, value:Number = 0):void
{
var element:Number = value;
var matrix:Array = [1, 0, 0, 0, element,
0, 1, 0, 0, element,
0, 0, 1, 0, element,
0, 0, 0, 1, 0];
var colorfilter:ColorMatrixFilter = new ColorMatrixFilter(matrix);
target.filters = [colorfilter];
}
The colormatrix filter is constructed with a matrix. The value for brightness can go from -255 to 255.