User Guide
628 ActionScript classes
Keep in mind that the spread of the colors in the gradient varies based on the values of the
blurX, blurY, strength, and quality properties, as well as the ratios values.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example demonstrates how to set the
ratios property on an existing entity.
import flash.filters.GradientBevelFilter;
var mc:MovieClip = setUpFilter("ratiosExample");
mc.onPress = function() {
var arr:Array = this.filters;
var ratios:Array = [127, 128, 129];
arr[0].ratios = ratios;
this.filters = arr;
}
mc.onRelease = function() {
var arr:Array = this.filters;
var ratios:Array = [0, 128, 255];
arr[0].ratios = ratios;
this.filters = arr;
}
function setUpFilter(name:String):MovieClip {
var art:MovieClip = this.createEmptyMovieClip(name,
this.getNextHighestDepth());
var w:Number = 150;
var h:Number = 150;