private function onRollOver(ev:Event):void
{
myMovie.filters = [new ColorMatrixFilter(this.getSaturationMatrix())];
}
private function onRollOut(ev:Event):void
{
myMovie.filters = new Array();
}
private function getSaturationMatrix():Array {
var matrix:Array = new Array();
matrix = matrix.concat([0, 0, 0, 0, 0]); //red array
matrix = matrix.concat([0, 0, 0, 0, 0]); //green array
matrix = matrix.concat([0, 0, 1, 0, 0]); //blue array
matrix = matrix.concat([0, 0, 0, 1, 0]);
return matrix;
}
|