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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

focalPointRatio:Number [facultatif] - Ajouté dans Flash Player 8. Nombre qui contrôle<br />

l'emplacement <strong>du</strong> point focal <strong>du</strong> dégradé. La valeur 0 signifie que le point focal est au centre.<br />

La valeur 1 signifie que le point focal est au bord <strong>du</strong> cercle <strong>du</strong> dégradé. La valeur -1 signifie<br />

que le point focal est sur l'autre bord <strong>du</strong> cercle <strong>du</strong> dégradé. Toute valeur inférieure à -1 ou<br />

supérieure à 1 est arrondie à -1 ou 1. L'exemple suivant présente une valeur<br />

focalPointRatio définie sur 0,75 :<br />

Exemple<br />

Le co<strong>de</strong> suivant crée un effet d'ombre sphérique :<br />

import flash.geom.*<br />

this.createEmptyMovieClip("gradient_mc", this.getNextHighestDepth());<br />

with (gradient_mc)<br />

{<br />

fillType = "radial"<br />

colors = [0x000000, 0xFFFFFF];<br />

alphas = [50, 90];<br />

ratios = [0, 0xFF];<br />

spreadMethod = "pad";<br />

interpolationMethod = "RGB";<br />

focalPointRatio = 0.3;<br />

matrix = new Matrix();<br />

matrix.createGradientBox(100, 100, 0, 0, 0);<br />

beginGradientFill(fillType, colors, alphas, ratios, matrix,<br />

spreadMethod, interpolationMethod, focalPointRatio);<br />

moveTo(0, 0);<br />

lineTo(0, 100);<br />

lineTo(100, 100);<br />

lineTo(100, 0);<br />

lineTo(0, 0);<br />

endFill();<br />

}<br />

MovieClip 867

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

Saved successfully!

Ooh no, something went wrong!