MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 491

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

If a
property does not exist then the remaining parameters are all required; the
matrixType
function fails if any of them are missing. This matrix scales, translates, rotates, and skews the
unit gradient, which is defined at (-1,-1) and (1,1).
,
,
,
matrixType
x
y
w
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 the
y
upper left corner of the gradient,
and
is the rotation in radians of the gradient.
r
The following example uses a
an object with these properties.
_root.createEmptyMovieClip( "grad", 1 );
with ( _root.grad )
{
colors = [ 0xFF0000, 0x0000FF ];
alphas = [ 100, 100 ];
ratios = [ 0, 0xFF ];
matrix = { matrixType:"box", x:100, y:100, w:200, h:200, r:(45/
180)*Math.PI };
beginGradientFill( "linear", colors, alphas, ratios, matrix );
moveto(100,100);
lineto(100,300);
lineto(300,300);
lineto(300,100);
lineto(100,100);
endFill();
}
If a
property exists then it must equal
matrixType
required. The function fails if any of these conditions are not met.
,
,
.
h
r
matrixType
is the width of the gradient,
w
beginGradientFill()
is the string
,
"box"
is the height of the gradient,
h
method with a
matrix
and the remaining parameters are all
"box"
MovieClip.beginGradientFill()
is the horizontal
x
parameter that is
491

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Questions and answers

Table of Contents