2011年1月4日 星期二

[AS3][Tweener] Special property class_FilterShortcuts_GradientBevelFilter

Tweener Documentation_Special property class__●FilterShortcuts
GradientBevelFilter 有三個屬性目前不能使用,但也許後續能再度支援。

1000104_Tweener_FilterShortcuts_GradientBevelFilter_1.swf




import caurina.transitions.Tweener;
import caurina.transitions.properties.FilterShortcuts;
FilterShortcuts.init();

//
click_mc.addEventListener(MouseEvent.ROLL_OVER, onEventRollOver);
click_mc.addEventListener(MouseEvent.ROLL_OUT, onEventRollOut);
//
function onEventRollOver(e:MouseEvent = null):void{
 Tweener.addTween(e.currentTarget,
 {
  scaleX:2.5,
  scaleY:2.5,
  _GradientBevel_angle:300,
  _GradientBevel_blurX:15,
  _GradientBevel_blurY:15,
  _GradientBevel_distance:20,
  _GradientBevel_quality:1,
  _GradientBevel_strength:4,
  //_GradientBevel_type:"inner",
  //
  _DropShadow_alpha:0.25,
  _DropShadow_angle:120,
  _DropShadow_blurX:80,
  _DropShadow_blurY:80,
  _DropShadow_color:0x222222,
  _DropShadow_distance:20,
  _DropShadow_quality:1,
  _DropShadow_strength:2,
  //_DropShadow_hideObject:true,
  _DropShadow_inner:false,
  //_DropShadow_knockout:true,
  //
  time   :2,
  transition :"easeOutExpo"
 });
}
//
function onEventRollOut(e:MouseEvent = null):void{
 Tweener.addTween(e.currentTarget,
 {
  scaleX:1.7,
  scaleY:1.7,
  //
  _GradientBevel_angle:120,
  _GradientBevel_blurX:40,
  _GradientBevel_blurY:40,
  _GradientBevel_distance:40,
  _GradientBevel_quality:1,
  _GradientBevel_strength:3,
  //_GradientBevel_type:"inner",
  //
  _DropShadow_alpha:0.25,
  _DropShadow_angle:120,
  _DropShadow_blurX:40,
  _DropShadow_blurY:40,
  _DropShadow_color:0x222222,
  _DropShadow_distance:20,
  _DropShadow_quality:1,
  _DropShadow_strength:2,
  //_DropShadow_hideObject:true,
  _DropShadow_inner:false,
  //_DropShadow_knockout:true,
  //
  time   :2,
  transition :"easeOutExpo",
  onComplete:nextTween
 });
}
//
function nextTween():void{
 Tweener.addTween(click_mc,
 {
  scaleX:1.2,
  scaleY:1.2,
  //
  _GradientBevel_angle:240,
  _GradientBevel_blurX:10,
  _GradientBevel_blurY:10,
  _GradientBevel_distance:10,
  _GradientBevel_quality:1,
  _GradientBevel_strength:4,
  //_GradientBevel_type:"inner",
  //
  _DropShadow_alpha:0.3,
  _DropShadow_angle:120,
  _DropShadow_blurX:40,
  _DropShadow_blurY:40,
  _DropShadow_color:0x222222,
  _DropShadow_distance:8,
  _DropShadow_quality:1,
  _DropShadow_strength:3,
  //_DropShadow_hideObject:true,
  _DropShadow_inner:false,
  //_DropShadow_knockout:true,
  //
  delay:0.5,
  time   :1,
  transition :"easeOutExpo"
 });
}

沒有留言: