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.

}<br />

function createGradientGlowRectangle(name:String):MovieClip {<br />

var art:MovieClip = this.createEmptyMovieClip(name,<br />

this.getNextHighestDepth());<br />

var w:Number = 100;<br />

var h:Number = 100;<br />

art.beginFill(0x003366);<br />

art.lineTo(w, 0);<br />

art.lineTo(w, h);<br />

art.lineTo(0, h);<br />

art.lineTo(0, 0);<br />

art._x = 20;<br />

art._y = 20;<br />

}<br />

var colors:Array = [0xFFFFFF, 0xFF0000, 0xFFFF00, 0x00CCFF];<br />

var alphas:Array = [0, 1, 1, 1];<br />

var ratios:Array = [0, 63, 126, 255];<br />

var filter:GradientGlowFilter = new GradientGlowFilter(0, 45, colors,<br />

alphas, ratios, 55, 55, 2.5, 2, "outer", false);<br />

var filterArray:Array = new Array();<br />

filterArray.push(filter);<br />

art.filters = filterArray;<br />

return art;<br />

Voir également<br />

colors (propriété GradientGlowFilter.colors), alphas (propriété<br />

GradientGlowFilter.alphas), beginGradientFill (métho<strong>de</strong><br />

MovieClip.beginGradientFill)<br />

strength (propriété GradientGlowFilter.strength)<br />

public strength : nombre<br />

L'intensité <strong>de</strong> l'impression ou <strong>du</strong> recouvrement. Plus la valeur est élevée, plus l'intensité <strong>de</strong>s<br />

couleurs apparaît à l'impression et plus le contraste est important entre le rayonnement et<br />

l'arrière-plan. Les valeurs vali<strong>de</strong>s sont comprises entre 0 et 255. La valeur 0 signifie que le filtre<br />

n'est pas appliqué. La valeur par défaut est 1.<br />

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

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

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

Saved successfully!

Ooh no, something went wrong!