
MovieClip.beginGradientFill() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
637
Ric Ewing has posted more custom drawing methods at:
http://www.formequalsfunction.com/downloads/drawmethods.html
See Also
MovieClip.beginGradientFill(), MovieClip.clear(), MovieClip.curveTo(), MovieClip.endFill(),
MovieClip.lineStyle(), MovieClip.lineTo(), MovieClip.moveTo(); Chapter 13
MovieClip.beginGradientFill() Method
starts a gradient-filled shape
Flash 6
mc.beginFill(fillType, colors, alphas, ratios, matrix)
Arguments
fillType A string indicating the type of gradient, either “linear” or “radial”. If any
other value is specified, no gradient is drawn.
colors An array of integers specifying the colors in the gradient. Normally supplied
in RGB hexadecimal triplet notation—
0xRRGGBB, where RR, GG, and BB are two-
digit hex numbers representing Red, Green, and Blue. For example, the hex
integer
0xFF0000 indicates red. For a complete discussion of RGB triplet nota-
tion, see the Color class.
alphas An array of integers between 0 and 100, specifying the percentage opacity (or,
conversely, the transparency) of the colors in the gradient. 0 is completely
transparent, whereas 100 is completely opaque. Values above 100 are inter-
preted as 100; those below 0 are interpreted as 0. If the number of elements
in the
alphas array ...