In the following code and image, a filter is applied to a black circle movie clip, with the type
set to
. For instructional purposes, the first color in the
"full"
value of 1, so it shows against the white document background. (In practice, you
alpha
probably would not want the first color showing in this way.) Note the last color in the array,
yellow, obscures the black circle to which the filter is applied:
var colors = [0xFFCCFF, 0x0000FF, 0x9900FF, 0xFF0000, 0xFFFF00];
var alphas = [1, 1, 1, 1, 1];
var ratios = [0, 32, 64, 128, 225];
var myGGF = new GradientGlowFilter(0, 0, colors, alphas, ratios, 50, 50, 1,
2, "full", false);
To achieve a seamless effect with your document background when you set the
or
, set the first color in the array to the same color as the document
"outer"
"full"
background, or set the alpha value of the first color to 0; either technique makes the filter
blend in with the background.
648
ActionScript classes
array, pink, has an
colors
type
value to
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?