Hello, everyone! I would like some help in order to use updateTo function correctly. I create tweens like this :
this.tween = TweenMax.fromTo(this.cont2, time/1000, {y:0}, {y:1000, ease:Linear.easeNone, onComplete:on_stop, onCompleteParams:[this.rNum]});
and i would like to be able to stop it during tweening, by setting a new destination y parameter. So i tried to do it like this :
this.tween.updateTo({y:500}, false);
but this is changing the object's current y position, and not the final y destination. So based on the documentation, i am changing the fromVars Object, instead the toVars Object.
My question is, wether i can change the destination position on the fly, and how.
Thanks in adnvance!
EDIT :
I was wrong. The above way to change destination y is correct!
It seems like i have to change manually the duration of the tween also. That's why i was getting the wrong visual effect i was looking for.
So i rephrase my question. Is there a way to tell the tween to stop at the new updated y parameter, regardless of the initial duration? Or do i have to calculate the distance covered, and figure out how much time it should get.
Thanks, and sorry for the misunderstanding...!