+ -
当前位置:首页 → 问答吧 → 关于色彩偏移量怎么用TweenLite实现的问题

关于色彩偏移量怎么用TweenLite实现的问题

时间:2011-08-20

来源:互联网

下面的MC为一个色彩渐变的影片剪辑  当我点this["btn"+i]按钮的时候  可以实现色彩的偏移  但是用TweenLite我就不知道怎么实现了  TweenLite.to(white,0.1,{rb:-100, gb:-100, bb:-100});  这样写不知道有没有错,但是没有myColor.setTransform(white);
复制内容到剪贴板
代码:
import gs.TweenLite;
import gs.easing.Quint;
var coff:Array = new Array();
coff = [[199, -67, -23], [44, 226, 146], [0, 77, 88],[0,0,0]];
_global.coffs = 3;
var myColor = new Color(mc);
var white = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:255, ab:255};
myColor.setTransform(white);
/*mc.onRollOver = function() {
TweenLite.to(white,0.1,{rb:-100, gb:-100, bb:-100},myColor.setTransform(white));
myColor.setTransform(white);
};*/
for(var i=0;i<3;i++){
    this["btn"+i].id=i
    this["btn"+i].onRollOver=function(){
        _global.coffs = this.id
        }
    }
mc.onEnterFrame = function() {
    
    white.rb += (coff[_global.coffs][0]-white.rb)/22;
    white.gb += (coff[_global.coffs][1]-white.gb)/22;
    white.bb += (coff[_global.coffs][2]-white.gb)/22;
    myColor.setTransform(white);
};

作者: emobaby   发布时间: 2011-08-20

直接TweenLite.to(xxxxxxx,xx,{tint:指定的颜色值});
如何把你的RGB值合并成颜色,不用说了吧

作者: flash023   发布时间: 2011-08-20