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

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

Advertisement

Parameters
- Either the string "
fillType:String
- An array of RGB hex color values to be used in the gradient (for example, red
colors:Array
is 0xFF0000, blue is 0x0000FF, and so on).
- An array of alpha values for the corresponding colors in the
alphas:Array
valid values are 0-100. If the value is less than 0, Flash uses 0. If the value is greater than 100,
Flash uses 100.
- An array of color distribution ratios; valid values are 0-255. This value
ratios:Array
defines the percentage of the width where the color is sampled at 100 percent.
- A transformation matrix that is an object with either of the following two
matrix:Object
sets of properties:
,
,
,
,
,
,
,
a
b
c
d
e
f
g
a b c
d e f
g h i
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 = {a:200, b:0, c:0, d:0, e:200, f:0, g:200, h:200, i:1};
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();
}
linear
,
, which can be used to describe a 3 x 3 matrix of the following form:
h
i
beginGradientFill()
" or the string "
radial
method with a
".
array;
colors
parameter
matrix
MovieClip
451

Advertisement

Table of Contents
loading

Table of Contents