User Guide

MovieClip 835
with (gradient_mc)
{
colors = [0xFF0000, 0x0000FF];
fillType = "radial"
alphas = [100, 100];
ratios = [0, 0xFF];
spreadMethod = "reflect";
interpolationMethod = "linearRGB";
focalPointRatio = 0.9;
matrix = new Matrix();
matrix.createGradientBox(100, 100, Math.PI, 0, 0);
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();
}
This code draws the following image onscreen:
You can use the properties a, b, c, d, e, f, g, h, and i, which can be used to describe a 3 x
3 matrix of the following form:
a b c
d e f
g h i
The following example uses the beginGradientFill() method with a matrix parameter
of this type:
this.createEmptyMovieClip("gradient_mc",
this.getNextHighestDepth());
with (gradient_mc)
{
NOTE
For Flash Player 8 and later, Macromedia recommends that you define the matrix
parameter in the form of a
flash.geom.Matrix object (as described in the first item in
the list).