ActionScript Bitmap Filter Tweening
i can't seem to tween any bitmap filters. here's my code:
var dropShadow:DropShadowFilter = new DropShadowFilter();
mySprite.filters = [dropShadow];
var dropShadowTween:Tween = new Tween(dropShadow, "distance", Regular.easeOut, 4.0开发者_运维知识库, 20, 2, true);
what is my mistake? i've also tried the following but it doesn't work:
var dropShadowTween:Tween = new Tween(mySprite.filters[0], "distance", Regular.easeOut, 4.0, 20, 2, true);
the main problem with the tweening of filters is that you have to reassign them before they change, just changing the value of the dropshadow wont make a difference until you call mySprite.filters = new Array(dropshadow)
again. Just incase it becomes needed further down the line!
i would personally use TweenLite by Greensock with its FilterPlugins, works a treat!
精彩评论