User Guide
426 ActionScript classes
Method summary
Methods inherited from class BitmapFilter
Methods inherited from class Object
clone (ColorMatrixFilter.clone method)
public clone() : ColorMatrixFilter
Returns a copy of this filter object.
Availability: ActionScript 1.0; Flash Player 8
Returns
flash.filters.ColorMatrixFilter - A new ColorMatrixFilter instance with all the same
properties as the original one.
Example
The following example creates a new ColorMatrixFilter instance and then clones it using the
clone method. The matrix property cannot be changed directly (for example,
clonedFilter.matrix[2] = 1;). Instead, you must get a reference to the array, make the
change, and reset the value using
clonedFilter.matrix = changedMatrix.
import flash.filters.ColorMatrixFilter;
var matrix:Array = new Array();
matrix = matrix.concat([1, 0, 0, 0, 0]); // red
matrix = matrix.concat([0, 1, 0, 0, 0]); // green
matrix = matrix.concat([0, 0, 1, 0, 0]); // blue
matrix = matrix.concat([0, 0, 0, 1, 0]); // alpha
Modifiers Signature Description
clone() :
ColorMatrixFilter
Returns a copy of this filter object.
clone (BitmapFilter.clone method)
addProperty (Object.addProperty method), hasOwnProperty
(Object.hasOwnProperty method), isPropertyEnumerable
(Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf
method), registerClass (Object.registerClass method), toString
(Object.toString method), unwatch (Object.unwatch method), valueOf
(Object.valueOf method), watch (Object.watch method)