Is there a set distance you want to go, or is it completely variable?
It is variable. I can't use any fixed label in the timeline.
Imagine you animate a progress bar by streching its width from 0% to 100% in 1 second. Now, you want to be able to stop the progress bar depending on a variable's value.
1 person found this helpful
Hi, juicy_life, elaine-san.
In this case, How about using the setTimeout()?
var targetSym = sym; var start = 1000; var finish = 1500; setTimeout(targetSym.stop.bind(targetSym), Math.abs(finish - start)); targetSym.play(start); //or targetSym.playReverse(start) //case of need adjustment //setTimeout(targetSym.stop.bind(targetSym), Math.abs(finish - start), finish);
Because it's a "timer processing", so troubled if it's stopped on the way.
but, case of short-time animation, may be O.K.
Nice way around the problem. Visual results a bit unpredictable, but with the adjustment option they are solved decently. It's a good option to consider though. Thanks.