[Golist] GoASAP/HydroTween Timing & Overlap

Gil Birman gil at allflashwebsite.com
Sat Aug 9 15:12:11 PDT 2008


At first glance, you'd think both of these would do the same thing. However,
as discussed in a recent thread, GoASAP's timing isn't perfect. Most of the
time, your tween will actually take slightly longer than the *duration*. In
the unreliable example below, I start another tween of the same object and
property after a delay. Contrast this to the reliable example where an
actual sequence is created. Most of the time, when using the unreliable
example the second tween will begin before the first ends and thus one of
them cancels the other out.

// UNRELIABLE
// shape is a sprite or whatever
shape.alpha = 0.5;
new HydroSequence( [ { target: shape, alpha: 0, duration: 1 }, { target:
shape, alpha: 1, duration: 1, delay: 1 } ] );


// RELIABLE
// shape is a sprite or whatever
shape.alpha = 0.5;
new HydroSequence( { target: shape, alpha: 0, duration: 1 }, { target:
shape, alpha: 1, duration: 1 } );

In my testing, there is no telling what the alpha will be after the
unreliable example completes. Is this the expected behavior?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080809/3ae9b997/attachment.html 


More information about the GoList mailing list