03.07.2013 Views

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

mc.onPress = function() {<br />

var newMatrix:Array = [0, -1, 0, -1, 8, -1, 0, -1, 0];<br />

filter.matrix = newMatrix;<br />

myBitmapData.applyFilter(myBitmapData, myBitmapData.rectangle, new<br />

Point(0, 0), filter);<br />

}<br />

matrixX (propriété ConvolutionFilter.matrixX)<br />

public matrixX : Number<br />

La dimension x <strong>de</strong> la matrice (le nombre <strong>de</strong> colonnes <strong>de</strong> la matrice). La valeur par défaut est 0.<br />

Disponibilité : <strong>ActionScript</strong> 1.0 ; Flash Player 8<br />

Exemple<br />

L'exemple suivant affiche la propriété matrixX <strong>de</strong> filter.<br />

import flash.filters.ConvolutionFilter;<br />

var filter:ConvolutionFilter = new ConvolutionFilter(2, 3, [1, 0, 0, 1, 0,<br />

0], 6);<br />

trace(filter.matrixX); // 2<br />

matrixY (propriété ConvolutionFilter.matrixY)<br />

public matrixY : Number<br />

La dimension y <strong>de</strong> la matrice (le nombre <strong>de</strong> lignes <strong>de</strong> la matrice). La valeur par défaut est 0.<br />

Disponibilité : <strong>ActionScript</strong> 1.0 ; Flash Player 8<br />

Exemple<br />

L'exemple suivant affiche la propriété matrixY <strong>de</strong> filter.<br />

import flash.filters.ConvolutionFilter;<br />

var filter:ConvolutionFilter = new ConvolutionFilter(2, 3, [1, 0, 0, 1, 0,<br />

0], 6);<br />

trace(filter.matrixY); // 3<br />

486 Chapitre 2: Classes <strong>ActionScript</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!