MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 839

Actionscript 2.0 language reference
Table of Contents

Advertisement

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

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