Hi there. I've been searching on this site and haven't been able to find anything to solve my problem but I should mention I'm no expert. I've been working on banner ads (was used to working with Flash but now using HTML5) and I want to be able to make the banners repeat but ONLY TO A CERTAIN POINT. I've attached some very simplified code to give an idea of what I'm talking about. I'm using 'restart' to repeat the banner but I want the animation to only repeat once and to stop at a certain point in the case below I want it to stop where the cta fades in, i.e., the third to last line of the timline lite. Here's the code:
var tl = new TimelineLite({onComplete:bannerRestart});
tl.to(copy1, .5, {alpha:1, ease:Linear.easeNone},"+=.7")
.to(copy1, .3, {alpha:0, ease:Linear.easeNone},"+=2.5")
.to(copy2, .5, {alpha:1, ease:Linear.easeNone},"+=.3")
.to(cta, .5, {alpha:1, ease:Linear.easeNone},"+=1")
.to(copy2, .3, {alpha:0, ease:Linear.easeNone},"+=2.5")
.to(cta, .5, {alpha:0, ease:Linear.easeNone},"-=.3")
function bannerRestart() {
tl.restart();
}
If anyone could help I'd be very thankful!!