xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="initFilter(event);" width="700">
import mx.effects.EffectTargetFilter;
import flash.events.Event;
// This function returns true for the Panel moving to x=110.
public function filterFunc(propChanges:Array,
instanceTarget:Object):Boolean {
// Determine the length of the propChanges Array.
for (var i:uint=0; i < propChanges.length; i++)
{
// Determine the Array element
// that matches the effect target.
if (propChanges[i].target == instanceTarget)
{
// Check whether the end Object contains
// a value for x.
if (propChanges[i].end["x"] != undefined)
{
// Return true if the end value for x is 110.
return (propChanges[i].end.x == 110);
}
}
}
return false;
}
// Define the EffectTargetFilter object.
private var myBlurFilter:EffectTargetFilter;
// Initialize the EffectTargetFilter object, and set the
// customFilter property for two Blur effects.
private function initFilter(event:Event):void {
myBlurFilter = new EffectTargetFilter();
myBlurFilter.filterFunction=filterFunc;
myBlur.customFilter=myBlurFilter;
myUnBlur.customFilter=myBlurFilter;
}
blurYFrom="0.0" blurYTo="10.0" />
blurXTo="0.0" blurYFrom="10.0" blurYTo="0.0" />
x.Two="0" y.Two="0" width="100" height="100" width.One="200"
height.One="210" width.Two="100" height.Two="100" click="currentState='One'">
x.Two="110" y.Two="0" width="100" height="100" width.One="100"
height.One="100" width.Two="200" height.Two="210" click="currentState='Two'">
x.Two="0" y.Two="110" width="200" height="210" width.One="100"
height.One="100" width.Two="100" height.Two="100" click="currentState='default'">