ベベル効果 (2)

ベベル効果のパラメータで遊んでみた。

:caution: 要 Flash Player 8 以上

This movie requires Flash Player 9.0.0

_root 第1フレームに
import flash.filters.BevelFilter;

var frog:MovieClip;
var bevelFilter:BevelFilter = new BevelFilter();
var distance:Number = 4;
var angle:Number = 45;
var highlightColor:Number = 0xFFFFFF;
var highlightAlpha:Number = 1;
var shadowColor:Number = 0x000000;
var shadowAlpha:Number = 1;
var blurX:Number = 4;
var blurY:Number = 4;
var strength:Number = 1;
var quality:Number = 1;
var type:String = "inner";
var knockout:Boolean = false;

function setFrogFilter() {
  bevelFilter.distance = distance;
  bevelFilter.angle = angle;
  bevelFilter.highlightColor = highlightColor;
  bevelFilter.highlightAlpha = highlightAlpha;
  bevelFilter.shadowColor = shadowColor;
  bevelFilter.shadowAlpha = shadowAlpha;
  bevelFilter.blurX = blurX;
  bevelFilter.blurY = blurY;
  bevelFilter.strength = strength;
  bevelFilter.quality = quality;
  bevelFilter.type = type;
  bevelFilter.knockout = knockout;
  frog.filters = [bevelFilter];
}
setFrogFilter();
と記述。

distance, angle, highlightColor, highlightAlpha, shadowColor, shadowAlpha,
blurX, blurY, strength, quality, type, knockout の値を変えて、
setFrogFilter() 関数を実行すれば、
フィルタ効果を変化させることができます。 :boy: