ActionScript 位图滤镜补间
我似乎无法补间任何位图过滤器。这是我的代码:
var dropShadow:DropShadowFilter = new DropShadowFilter();
mySprite.filters = [dropShadow];
var dropShadowTween:Tween = new Tween(dropShadow, "distance", Regular.easeOut, 4.0, 20, 2, true);
我的错误是什么?我也尝试过以下方法,但它不起作用:
var dropShadowTween:Tween = new Tween(mySprite.filters[0], "distance", Regular.easeOut, 4.0, 20, 2, true);
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);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
补间滤镜的主要问题是您必须在它们更改之前重新分配它们,仅更改 dropshadow 的值不会产生任何影响,直到您再次调用 mySprite.filters = new Array(dropshadow) 。以防万一以后需要它!
我个人会使用 Greensock 的 TweenLite 及其 FilterPlugins,效果很好!
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!