Hi, Im having troubles with the restart, is missing the "first line" and dont is the same at start, the line tl.to("#imagen1", 6, { scale:1.2,alpha:1 , ease: Power0.easeOut }, "1"); doesnt work when i repeat it. Do you know why, or how to fix this error??
(function () {
//TWEENS
var tl = new TimelineLite({
//onComplete:rewind
onStart:go1,
onComplete:rewind
});
tl.timeScale(1);
//tl.from("#logo",0, { scale:0.0, alpha:0, ease: Power2.easeOut }, "=0");
//tl.addLabel("cartela1");
tl.from("#imagen1",1, { scale:1.0, alpha:1, ease: Power2.easeOut }, "0");
tl.from("#textomira1",1.5, {color:"#ffffff", ease: Power2.easeOut }, "0");
tl.from("#texto1",1, { alpha:1, ease: Power2.easeOut }, "0");
tl.from(".marki",0, {backgroundColor:"#ffffff",color:"#ffffff",fontWeight:"normal", ease: Power2.easeOut }, "0");
tl.to("#imagen1", 6, { scale:1.2,alpha:1 , ease: Power0.easeOut }, "1");
tl.to("#textomira1",0.5, {color:"#000000", ease: Power2.easeOut }, "1");
tl.from("#textomira2",0, {color:"#ffffff", ease: Power2.easeOut }, "7");
tl.to("#textomira2",1, {color:"#000000", ease: Power2.easeOut }, "2");
tl.to(".marki",0.5, {backgroundColor:"#000000",color:"#ffffff",fontWeight:"bold", ease: Power2.easeOut }, "3");
tl.addLabel("cartela2");
tl.to("#texto1", 2, { alpha:0 , ease: Power2.easeOut }, "5");
tl.to("#imagen1", 2, { scale:1.22, alpha:0 , ease: Power0.easeOut }, "5");
tl.from("#imagen2",2, { scale:1, alpha:0, ease: Power0.easeOut }, "5");
tl.to("#imagen2",5, { scale:1.15, alpha:0, ease: Power4.easeOut }, "5");
tl.to("#imagen2",2.5, { alpha:1, ease: Power0.easeOut }, "5");
tl.from("#texto2",3, {alpha:0, ease: Power2.easeOut }, "6");
tl.addLabel("cartela3");
tl.to("#texto2", 2, {alpha:0 , ease: Power2.easeOut }, "10");
tl.to("#imagen2", 2, { alpha:0 , ease: Power2.easeOut }, "10");
tl.from("#imagen3",4, { alpha:0, ease: Power2.easeOut }, "10");
tl.from("#texto3",2, {alpha:0, ease: Power2.easeOut }, "10");
tl.from("#comprar",0.5, { alpha:1, ease: Power2.easeOut }, "10");
tl.from("#comprar2",0.5, { alpha:1, ease: Power2.easeOut }, "10");
tl.from("#comprarespacio",0.5, { alpha:0, ease: Power2.easeOut }, "10");
tl.addLabel("cartela4");
tl.to("#comprar",0.5, { alpha:1,bottom:"-100%", ease: Power2.easeOut }, "12");
tl.to("#comprar2",0.5, { alpha:1,bottom:"0%", ease: Power2.easeOut }, "12");
function go1(){
tl.gotoAndPlay(1);
}
function rewind(){
tl.restart();
}
}());
Thanks in advance!