ColorMatrixFilter clone() [AS 2]
Klasa: ColorMatrixFilter
Kompatybilność: ActionScript 1.0, Flash8+
Zwraca kopiÄ™ aktualnego filtru obiektu typu ColorMatrixFilter.
Listing
import flash.filters.ColorMatrixFilter;
var matrix:Array = new Array();
matrix = matrix.concat([1, 0, 0, 0, 0]); // czerwont
matrix = matrix.concat([0, 1, 0, 0, 0]); // zielony
matrix = matrix.concat([0, 0, 1, 0, 0]); // niebieski
matrix = matrix.concat([0, 0, 0, 1, 0]); // przezroczystość
var filtr:ColorMatrixFilter = new ColorMatrixFilter(matrix);
trace("filtr: " + filtr.matrix);
var sklonowanyFiltr:ColorMatrixFilter = filtr.clone();
matrix = sklonowanyFiltr.matrix;
matrix[2] = 1;
sklonowanyFiltr.matrix = matrix;
trace("sklonowanyFiltr: " + sklonowanyFiltr.matrix);
var matrix:Array = new Array();
matrix = matrix.concat([1, 0, 0, 0, 0]); // czerwont
matrix = matrix.concat([0, 1, 0, 0, 0]); // zielony
matrix = matrix.concat([0, 0, 1, 0, 0]); // niebieski
matrix = matrix.concat([0, 0, 0, 1, 0]); // przezroczystość
var filtr:ColorMatrixFilter = new ColorMatrixFilter(matrix);
trace("filtr: " + filtr.matrix);
var sklonowanyFiltr:ColorMatrixFilter = filtr.clone();
matrix = sklonowanyFiltr.matrix;
matrix[2] = 1;
sklonowanyFiltr.matrix = matrix;
trace("sklonowanyFiltr: " + sklonowanyFiltr.matrix);
Dodano przez: divix
Ranga: Administrator serwisu Punktów: 38473
Ranga: Administrator serwisu Punktów: 38473
Komentarze użytkowników
:: Losowe artykuły

:: Wymiana linków

Modowe inspiracje |
Android Gry i Aplikacje |
ZaplanujTransport.pl: Przeprowadzki, transport, aukcje |
Logo dla firmy |
Change Tires - Car Weather Forecast Reminder |
Zend Framework 3. Developer's Guide |
IT Books Reviews and Programming: JS, JAVA, PHP, ANDROID, CSS |
Katalog roślin |
Programming articles of: JAVA, PHP, C++, Pyth, JavaScript and so on..