我的代码如下。当TweenMax
我添加第二行代码时,倾斜不起作用,改变了waterSkew
函数中的倾斜。当函数的第二行waterSkew
被删除时它工作正常。
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;
TweenPlugin.activate([TransformMatrixPlugin]);
//CHANTEL Timeline variables
var cMoveTimeline:TimelineLite = new TimelineLite();
function init():void{
waterSkew();
cMove();
}
function cMove():void{
cMoveTimeline.to(C,2,{x:166.9, y:479.55});
cMoveTimeline.to(C,1,{x:166.9, y:467.7, rotation:5}, "+=.15");
cMoveTimeline.to(C,1,{x:163.3, y:471.25, rotation:-5}, "+=.25");
cMoveTimeline.to(C,1,{x:166.9, y:467.7, rotation:5});
cMoveTimeline.to(C,1,{x:166.9, y:479.55, rotation:-5}, "+=.25");
cMoveTimeline.to(C,1,{x:170.5, y:469.5, rotation:0});
}
function waterSkew():void{
TweenMax.to(water, 8, {transformMatrix:{skewX:1, skewY:-1}});
TweenMax.from(water, 8, {transformMatrix:{skewX:1, skewY:1}});
}
init();