-
Tween filter properties using Tweener
Someone please help...
I am trying to tween the BlurFilter's properties (or any other filter's properties) using Tweener. Please tell me why my code is not working.
Code:
var bf:BlurFilter = new BlurFilter(10,10,3);
var aFilters:Array = new Array(bf);
mc.filters = aFilters;
mc.addEventListener(MouseEvent.MOUSE_OVER,doBlur);
function doBlur(e:Event):void
{
Tweener.addTween(mc,{blurX:0,blurY:0,time:1,transition:"linear"});
}
-
OOP is one letter from OOPS
Never used tweener, but my guess would be that if it is expanding upon the built in tween classes, the property you are tweening has to be a property of the clip that the tween is applied to. blurX and blurY if i remember correctly are actually properties of the blur filter, not the clip itself.
-
Okay, actually I found the answer in the documentation. You have to use the filter shortcuts.
import caurina.transitions.properties.FilterShortcuts;
FilterShortcuts.init();
Then you can tween the filter properties like this:
Tweener.addTween(mc,{_Blur_blurX:0,_Blur_blurY:0,t ime:1,transition:"linear"});
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|