开发者

Infinite tweening hue loop in AS3 with Tweener

I'm trying to infinitely loop a bitmap all the way through the colour 开发者_高级运维spectrum using AS3, Tweener and its ColorShortcuts class. This doesn't loop back to the function "tween1":

function tween1():void {
    Tweener.addTween(image, { _hue: 180, time:5, onComplete:tween2 } );
}

function tween2():void {
    Tweener.addTween(image, { _hue: -180, time:5, onComplete:tween1 } );
}

Any ideas? Thanks in advance!


I haven't tested, but could you get away with:

function tween1():void {
    image._hue = -180;//you might need something like a colorMatrix here
    Tweener.addTween(image, { _hue: 180, time:5, onComplete:tween1 } );
}

I know there is no _hue by default, but I'm guessing you see what I mean.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜