/**
* VERSION: 2.0
* DATE: 8/18/2009
* ACTIONSCRIPT VERSION: 3.0
* UPDATES AND DOCUMENTATION AT: http://www.TweenMax.com
**/
package com.greensock.plugins {
import com.greensock.*;
import flash.filters.BlurFilter;
/**
* Tweens a BlurFilter. The following properties are available (you only need to define the ones you want to tween):
*
*
* - blurX : Number [0]
* - blurY : Number [0]
* - quality : uint [2]
* - index : uint
* - addFilter : Boolean [false]
* - remove : Boolean [false]
*
*
*
* Set remove
to true if you want the filter to be removed when the tween completes.
*
* USAGE:
*
* import com.greensock.TweenLite;
* import com.greensock.plugins.TweenPlugin;
* import com.greensock.plugins.BlurFilterPlugin;
* TweenPlugin.activate([BlurFilterPlugin]); //activation is permanent in the SWF, so this line only needs to be run once.
*
* TweenLite.to(mc, 1, {blurFilter:{blurX:10, blurY:10}});
*
*
* Copyright 2011, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.
*
* @author Jack Doyle, jack@greensock.com
*/
public class BlurFilterPlugin extends FilterPlugin {
/** @private **/
public static const API:Number = 1.0; //If the API/Framework for plugins changes in the future, this number helps determine compatibility
/** @private **/
private static var _propNames:Array = ["blurX","blurY","quality"];
/** @private **/
public function BlurFilterPlugin() {
super();
this.propName = "blurFilter";
this.overwriteProps = ["blurFilter"];
}
/** @private **/
override public function onInitTween(target:Object, value:*, tween:TweenLite):Boolean {
_target = target;
_type = BlurFilter;
initFilter(value, new BlurFilter(0, 0, value.quality || 2), _propNames);
return true;
}
}
}