var filter:GradientBevelFilter = new GradientBevelFilter(5, 225, colors,
alphas, ratios, 5, 5, 5, 2, "inner", false);
art.filters = new Array(filter);
return art;
}
See also
colors (GradientBevelFilter.colors property)
(GradientBevelFilter.ratios property)
angle (GradientBevelFilter.angle property)
public angle : Number
The angle, in degrees. Valid values are 0 to 360. The default is 45.
The angle value represents the angle of the theoretical light source falling on the object. The
value determines the angle at which the gradient colors are applied to the object: where the
highlight and the shadow appear, or where the first color in the array appears. The colors are
then applied in the order in which they appear in the array.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example demonstrates how to set the
import flash.filters.GradientBevelFilter;
var mc:MovieClip = setUpFilter("angleExample");
mc.onRelease = function() {
var arr:Array = this.filters;
arr[0].angle = 45;
this.filters = arr;
}
function setUpFilter(name:String):MovieClip {
var art:MovieClip = this.createEmptyMovieClip(name,
this.getNextHighestDepth());
var w:Number = 150;
var h:Number = 150;
art.beginFill(0xCCCCCC);
art.lineTo(w, 0);
art.lineTo(w, h);
art.lineTo(0, h);
art.lineTo(0, 0);
616
ActionScript classes
,
ratios
property on an existing object.
angle
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?