MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference page 452

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

This code draws the following image on the screen:
,
,
matrixType
x
y
The properties indicate the following:
position relative to the registration point of the parent clip for the upper-left corner of the
gradient,
is the vertical position relative to the registration point of the parent clip for
y
the upper-left corner of the gradient,
gradient, and
is the rotation in radians of the gradient.
r
The following example uses the
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();
}
452
ActionScript classes
,
,
,
.
w
h
r
w
beginGradientFill()
is the string
matrixType
is the width of the gradient,
method with a
,
is the horizontal
"box"
x
is the height of the
h
parameter
matrix

Advertisement

Table of Contents
loading

Table of Contents