Hi Carl, back again,
Sorry I think I was just playing with it at the moment you saw the code. But luckily I found the issue!
The problem was when going to a point in the timeline the value of a property gets the one on which ended the previous tween. In my case I had a Y:-400 in the previous tween so then when getting to the next label the animation was starting there instead of starting from the point in the Y axis on which the object was.At the end as you can see here I setted the Y manually before starting the animation.
tlBall2.
from(ball2,.6,{y:0, scale:0, ease: Back.easeOut.config(1.5)}).
addLabel('loop').
to(ball2,.7,{y:10, ease: Sine.easeInOut}).
to(ball2,.7,{y:0, ease: Sine.easeInOut}).
call(goToPoint, [tlBall2, 'loop']).
addLabel('animationOut', "+=0.01").
to(ball2, 1,{y:-400, ease: Back.easeIn.config(1)}).
call(goToPoint, [tlBall2, 0]).
addLabel('animationReverse', "+=0.01").
set(ball2, {y:0}).
fromTo(ball2, 1,{scale:1}, { scale:0, ease: Back.easeOut.config(1)}).
addPause();
Knowing this I have another doubt, is there a way to change the animation of an object starting from the state on which it is in a specific moment regardless of which state is that? I can think of a way using several timelines and swapping between them, or maybe calling a function to retrieve the state of the object and setting it before continuing with the animation, but I am sure there must be a better and cleaner way.
Thanks again!