BevelFilter (flash.filters.BevelFilter)
277
type
:String
[optional] - The type of bevel. Valid values are
"inner"
,
"outer"
, and
"full"
.
The default value is
"inner"
.
knockout
:Boolean
[optional] - Applies a knockout effect (
true
), which effectively makes the
object's fill transparent and reveals the background color of the document. The default value
is
false
(no knockout).
Example
The following example instantiates a new BevelFilter and applies it to the MovieClip instance
(
rect
):
import flash.filters.BevelFilter;
var distance:Number = 5;
var angleInDegrees:Number = 45;
var highlightColor:Number = 0xFFFF00;
var highlightAlpha:Number = .8;
var shadowColor:Number = 0x0000FF;
var shadowAlpha:Number = .8;
var blurX:Number = 5;
var blurY:Number = 5;
var strength:Number = 5;
var quality:Number = 3;
var type:String = "inner";
var knockout:Boolean = false;
var filter:BevelFilter = new BevelFilter(distance,
angleInDegrees,
highlightColor,
highlightAlpha,
shadowColor,
shadowAlpha,
blurX,
blurY,
strength,
quality,
type,
knockout);
var rect:MovieClip = createRectangle(100, 100, 0x00CC00,
"bevelFilterExample");
rect.filters = new Array(filter);
function createRectangle(w:Number, h:Number, bgColor:Number,
name:String):MovieClip {
var rect:MovieClip = this.createEmptyMovieClip(name,
this.getNextHighestDepth());
rect.beginFill(bgColor);
rect.lineTo(w, 0);
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...