focalPointRatio:Number
location of the focal point of the gradient. The value 0 means the focal point is in the center.
The value 1 means the focal point is at one border of the gradient circle. The value -1 means
the focal point is at the other border of the gradient circle. A value less than -1 or greater than
1 is rounded to -1 or 1. For example, the following image shows a
0.75:
Example
The following code creates a spherical shade effect:
import flash.geom.*
this.createEmptyMovieClip("gradient_mc", this.getNextHighestDepth());
with (gradient_mc)
{
fillType = "radial"
colors = [0x000000, 0xFFFFFF];
alphas = [50, 90];
ratios = [0, 0xFF];
spreadMethod = "pad";
interpolationMethod = "RGB";
focalPointRatio = 0.3;
matrix = new Matrix();
matrix.createGradientBox(100, 100, 0, 0, 0);
beginGradientFill(fillType, colors, alphas, ratios, matrix,
spreadMethod, interpolationMethod, focalPointRatio);
moveTo(0, 0);
lineTo(0, 100);
lineTo(100, 100);
lineTo(100, 0);
lineTo(0, 0);
endFill();
}
[optional] - Added in Flash Player 8. A number that controls the
set to
focalPointRatio
MovieClip
839
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?