EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE - Page 452

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE
780 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
452 ActionScript classes
This code draws the following image on the screen:
matrixType, x, y, w, h, r.
The properties indicate the following:
matrixType is the string "box", x is the horizontal
position relative to the registration point of the parent clip for the upper-left corner of the
gradient,
y is the vertical position relative to the registration point of the parent clip for
the upper-left corner of the gradient,
w is the width of the gradient, h is the height of the
gradient, and
r is the rotation in radians of the gradient.
The following example uses the
beginGradientFill() method with a matrix parameter
of this type:
this.createEmptyMovieClip("gradient_mc", this.getNextHighestDepth());
with (gradient_mc)
{
colors = [0xFF0000, 0x0000FF];
fillType = "radial"
alphas = [100, 100];
ratios = [0, 0xFF];
spreadMethod = "reflect";
interpolationMethod = "linearRGB";
focalPointRatio = 0.9;
matrix = {matrixType:"box", x:100, y:100, w:200, h:200, r:(45/
180)*Math.PI};
beginGradientFill(fillType, colors, alphas, ratios, matrix,
spreadMethod, interpolationMethod, focalPointRatio);
moveTo(100, 100);
lineTo(100, 300);
lineTo(300, 300);
lineTo(300, 100);
lineTo(100, 100);
endFill();
}

Table of Contents

Related product manuals