I have some problems appending a tween, at the end of the timeline. This issue appears only after some heavy calculations take place. In order to simulate this I used the Tracer plugin for Firefox, and added a lot of traces.
As you can see in the code below, I have a timeline with two tweens. The initial tween is added immediately after the timeline is created, while the second tween is added after the first one is complete. If a lot of traces are displayed in the Tracer plugin, the second animation dosen't play.
In the example below, the red rectangle should first move horizontally to x = 450, and, after that, move vertically to y=450. When the issue appears, the second animation is not played.
I've tried to use the debugger and see what happens, and, as far as I can tell, the problem appears in TimelineMax::renderTime method, in the first call after the second tween is appened. The _rawPrevTime variable does not seem to be updated after the second tween is added, and its value is grater than the value of totalDur, failing the following if clause: if (_rawPrevTime <= totalDur && _rawPrevTime != time). Going further down the execution path, the cachedTotalDuration of the timeline doesn't seem to be updated as well (cachedTotalDuration is still 0.25, rather than 0.5), providing an early quit for the method. This happens in the following if clause: if (this.cachedTotalTime == prevTotalTime && !force).
Is is something that I am doing wrong, or is it a Timeline issue? Does anyone have a workarround, maybe?
I know it's kind of a strange way to test this by using traces, but on a low performance machine, this issue could appear without those traces.
Here is the sample code:
<?xml version="1.0" encoding="utf-8"?>