2011年1月5日 星期三

[AS3][Tweener] Special property class_FilterShortcuts_ConvolutionFilter

1000104_Tweener_FilterShortcuts_ConvolutionFilter_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,
  //
  _Convolution_alpha:0.3,
  _Convolution_bias:150,
  _Convolution_clamp:true,
  _Convolution_color:0x00aaff,
  //_Convolution_color_r:255,
  //_Convolution_color_g:255,
  //_Convolution_color_b:255,
  //_Convolution_matrixX:255,
  //_Convolution_matrixY:255,
  _Convolution_preserveAlpha:true,
  //
  time   :2,
  transition :"easeOutExpo"
 });
}
//
function onEventRollOut(e:MouseEvent = null):void{
 Tweener.addTween(e.currentTarget,
 {
  scaleX:1.7,
  scaleY:1.7,
  //
  _Convolution_alpha:0.3,
  _Convolution_bias:80,
  _Convolution_clamp:true,
  _Convolution_color:0x00aaff,
  //_Convolution_color_r:255,
  //_Convolution_color_g:255,
  //_Convolution_color_b:255,
  //_Convolution_matrixX:255,
  //_Convolution_matrixY:255,
  _Convolution_preserveAlpha:true,
  //
  time   :2,
  transition :"easeOutExpo",
  onComplete:nextTween
 });
}
//
function nextTween():void{
 Tweener.addTween(click_mc,
 {
  scaleX:1.2,
  scaleY:1.2,
  //
  _Convolution_alpha:0.3,
  _Convolution_bias:0,
  _Convolution_clamp:true,
  _Convolution_color:0x00aaff,
  //_Convolution_color_r:255,
  //_Convolution_color_g:255,
  //_Convolution_color_b:255,
  //_Convolution_matrixX:255,
  //_Convolution_matrixY:255,
  _Convolution_preserveAlpha:true,
  //
  delay:0.5,
  time   :1,
  transition :"easeOutExpo"
 });
}


沒有留言: