Ad.prototype.animateThreeFrames = function() {
this.tl.set("#message5, #message4 ", { autoAlpha: 0 });
this.tl.to(".gwd-page-wrapper", { duration: .2, autoAlpha: 1 }, "+=0")
this.tl.to("#cta", { duration: .2, autoAlpha: 1 }, "+=0")
//1
.to("#baseImage", { duration: 1, autoAlpha: 1 }, "+=0")
.from("#message1", {duration: 1,autoAlpha: 0,x: 100})
.to("#message1", {duration: 1,autoAlpha: 0}, "+=2")
//2
.from("#message2", {duration: 1,autoAlpha: 0,x: 100})
.to("#message2", {duration: 1,autoAlpha: 0}, "+=2")
//3
.from("#message3", {duration: 1,autoAlpha: 0,x: 100})
//if legal then show legal
if (!defaultValues.legal == "") {
this.tl.to("#message3", {duration: 1,autoAlpha: 0}, "+=2")
this.animation = this.tl.from("#legal", {duration: 1,autoAlpha: 0, onComplete:this.legalLoopCount, callbackScope:this})
this.message = this.message3;
}else {
this.tl.set("#legal", { autoAlpha: 0 });
}
};
Ad.prototype.legalLoopCount = function (el) {
console.log("value of element is now" + this.animation.message)
if (this.loopIncr == defaultValues.customVariable3) {
gsap.to(this.animation.message, {duration: 1,autoAlpha: 0, delay:2})
gsap.to(this.animation.message, {duration: 1,autoAlpha: 1,delay:2})
}
this.loopIncr +=1;
}
Hi, this is the best I can do at moment as I have to push on with work here in office sorry. I tried the above which is as close to the video example I could get but hmm value is undefined. Thanks