HI, I'm really new to all this, I just looked at the 'Getting Started' video.
My question is: is this the right way to get that result (the blue line shrink from left to right in an infinite loop) or there is another/better way to achive this result?
At first i tried this code:
TweenMax.to(".light", 0.8, {left:0, delay:1.7, ease:Power0.easeOut});
TweenMax.to(".dark", 0.8, {left:0, delay:3.7, ease:Power4.easeOut});
TweenMax.to(".dark", 0.6, {width:0, left:500, delay:4.2, ease:Power0.easeOut});
TweenMax.to(".dark", 0, {left:-500, width:500, delay:5, onComplete:complete, repeat:-1});
function complete() {
TweenMax.to(".dark", 0.8, {left:0, delay:2, ease:Power4.easeOut});
TweenMax.to(".dark", 0.8, {width:0, left:500, delay:2.5, ease:Power0.easeOut});
TweenMax.to(".dark", 0, {left:-500, width:500, delay:4});
};
But doesn't seems to works, it only works withouth:
repeat:-1
at the end of the line, and repeat only once.
I'm sure I'm missing something...
Thanks a lot