MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 834

Actionscript 2.0 language reference
Table of Contents

Advertisement

Availability: ActionScript 1.0; Flash Player 6 - Additional parameters spreadMethod,
interpolationMethod, and focalPointRatio added in Flash Player 8.
Parameters
- Valid values are the string "
fillType:String
- An array of RGB hexadecimal color values you can use in the gradient; for
colors:Array
example; red is 0xFF0000, blue is 0x0000FF. You can specify up to 15 colors. For each color,
ensure to specify a corresponding value in the
- An array of alpha values for the corresponding colors in the
alphas:Array
valid values are 0 to 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 to 255. This value
ratios:Array
defines the percentage of the width where the color is sampled at 100%. Specify a value for
each value in the
colors
For example, for a linear gradient that includes two colors, blue and green, the following
figure illustrates the placement of the colors in the gradient based on different values in the
array:
ratios
ratios
[0, 127]
[0, 255]
[127, 255]
The values in the array must increase sequentially; for example,
- A transformation matrix that can be in any one of three forms:
matrix:Object
A matrix object (supported by Flash Player 8 and later only), as defined by the
flash.geom.Matrix class. The flash.geom.Matrix class includes a
method, which lets you conveniently set up the matrix for use with the
beginGradientFill()
use this form of matrix for Flash Player 8 and later.
The following example uses the
of this type:
import flash.geom.*
this.createEmptyMovieClip("gradient_mc",
this.getNextHighestDepth());
834
ActionScript classes
parameter.
Gradient
method of MovieClip class. Macromedia recommends that you
beginGradientFill()
" and the string "
linear
and
parameters.
alphas
ratios
[0, 63, 127, 190, 255]
method with a
".
radial
array;
colors
createGradientBox()
parameter
matrix
.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF