Jump to content
Search Community

DragoshDX

Members
  • Posts

    2
  • Joined

  • Last visited

Community Answers

  1. DragoshDX's post in Updating tween value while animating was marked as the answer   
    Hello. 
     
    Since we're in a different time zone, I actually fixed the issue this morning before seeing the answer. 
     
    The solution I went with was creating a separate timeline which is a mirror image of the original one and tween a simple object such as data = {percentage: 1}. By tweening the percentage property with the same duration as the first tween, I can easily hit my 50% mark (I explicitly tween up to 50 ). Then, at each onComplete event of the rest of the tweens I run a bit of code that calculates how much the next tween has to finish, then create a new tween on the separate timeline that animates from the point the first default one stopped 50 to the next specified step at 70 with the same duration as the remaining time for the next tween. Thus they are perfectly in sync. 

    I grabbed the list of tweens in the original timeline using getChildren in the onComplete callback and searched for the next animation within. 

    This seems to work as I expect and is pretty fast and spot on so I guess we can consider the issue solved. 

    Thank you for reading though!
    Dragos.
×
×
  • Create New...