(1)斜角滤镜(BevelFilter)
对应AS代码:
[code]
var bevel:BevelFilter = new BevelFilter();
bevel.blurX = 15;
bevel.blurY = 15;
bevel.strength = 2;
bevel.quality = BitmapFilterQuality.LOW;
bevel.shadowColor = 0x000000;
bevel.shadowAlpha = 1;
bevel.highlightColor = 0xFFFFFF;
bevel.highlightAlpha = 1;
bevel.angle = 45;
bevel.distance = 5;
bevel.knockout = false;
bevel.type = BitmapFilterType.INNER;
var filtersArray:Array = new Array(bevel);
tt.filters = filtersArray;
[/code]
(2)模糊滤镜(BlurFilter)
对应AS代码:
[code]
var blur:BlurFilter = new BlurFilter();
blur.blurX = 2;
blur.blurY = 2;
blur.quality = BitmapFilterQuality.LOW;
var filtersArray:Array = new Array(blur);
tt.filters = filtersArray;
[/code]
(3)投影滤镜(DropShadowFilter)
对应AS代码:
[code]
var shadow:DropShadowFilter = new DropShadowFilter();
shadow.blurX = 10;
shadow.blurY = 10;
shadow.strength = 1.5;
shadow.quality = BitmapFilterQuality.MEDIUM;
shadow.color = 0x000000;
shadow.alpha = 1;
shadow.angle = 45;
shadow.distance = 5;
shadow.knockout = false;
shadow.inner = false;
shadow.hideObject = false;
var filtersArray:Array = new Array(shadow);
tt.filters = filtersArray;
[/code]
(4)发光滤镜(GlowFilter)
对应AS代码:
[code]
var glow:GlowFilter = new GlowFilter();
glow.blurX = 20;
glow.blurY = 20;
glow.strength = 1.5;
glow.quality = BitmapFilterQuality.MEDIUM;
glow.color = 0x00ff00;
glow.alpha = 1;
glow.knockout = false;
glow.inner = true;
var filtersArray:Array = new Array(glow);
tt.filters = filtersArray;
[/code]