User Guide
648 ActionScript classes
In the following code and image, a filter is applied to a black circle movie clip, with the type
set to
"full". For instructional purposes, the first color in the colors array, pink, has an
alpha value of 1, so it shows against the white document background. (In practice, you
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 type value to
"outer" or "full", set the first color in the array to the same color as the document
background, or set the alpha value of the first color to 0; either technique makes the filter
blend in with the background.