Tengo este codigo para manejar saturación y brillo de un campo de texto:
Código :
_global.brillo=0;
function SATURACION()
{
mitext.cacheAsBitmap = true;
var listener:Object = new Object();
listener.mitext = mitext;
listener.onMouseMove = function()
{
xPercent = 1 - (_xmouse/Stage.width);
yPercent = 1 - (_ymouse/Stage.height);
var matrix:Array = new Array();
matrix = matrix.concat([yPercent, 0, 0, 0, brillo]); // red
matrix = matrix.concat([0, xPercent, 0, 0, brillo]); // green
matrix = matrix.concat([0, 0, xPercent, 0, brillo]); // blue
matrix = matrix.concat([0, 0, 0, 1, 0]); // alpha
var filter:ColorMatrixFilter = new ColorMatrixFilter(matrix);
mitext.filters =new Array(filter);
}
Mouse.addListener(listener);
listener.onMouseMove();
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function BRILLO()
{
var brillo:Number = 100;
var matrix:Array = new Array();
matrix = matrix.concat([yPercent, 0, 0, 0, brillo]); // red
matrix = matrix.concat([0, xPercent, 0, 0, brillo]); // green
matrix = matrix.concat([0, 0, xPercent, 0, brillo]); // blue
matrix = matrix.concat([0, 0, 0, 1, 0]); // alpha
var filter:ColorMatrixFilter = new ColorMatrixFilter(matrix);
mitext.filters =new Array(filter);
}Lo que quiero es con esta misma matriz manejar contraste pero no se como hacerlo. Alguien sabe como hacerlo? o bueno si lo sabe hacer de otra manera tambien...