Method summary
Modifiers
Signature
clone() :
ColorMatrixFilter
Methods inherited from class BitmapFilter
clone (BitmapFilter.clone method)
Methods inherited from class Object
addProperty (Object.addProperty
(Object.hasOwnProperty
(Object.isPropertyEnumerable
method),
registerClass (Object.registerClass
(Object.toString
(Object.valueOf
method),
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
properties as the original one.
Example
The following example creates a new ColorMatrixFilter instance and then clones it using the
method. The
clone
matrix
clonedFilter.matrix[2] = 1;
change, and reset the value using
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
426
ActionScript classes
Description
Returns a copy of this filter object.
method),
method),
isPropertyEnumerable
method),
method),
unwatch (Object.unwatch
watch (Object.watch method)
- A new ColorMatrixFilter instance with all the same
property cannot be changed directly (for example,
). Instead, you must get a reference to the array, make the
clonedFilter.matrix = changedMatrix
hasOwnProperty
isPrototypeOf (Object.isPrototypeOf
method),
toString
method),
valueOf
.
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?
Questions and answers