Jump to content
GreenSock

TimelineLite

.recent()

.recent( ) : Animation

Returns the most recently added child tween/timeline/callback regardless of its position in the timeline.

Details

Returns the most recently added child tween/timeline/callback regardless of its position in the timeline.

var tl = new TimelineLite();
tl.to(e1, 999, {x:100, repeat:5}) //very long tween
.to(e2, 1, {y:200}, 0.5); //insert this tween at 0.5 seconds (toward the beginning of the timeline)
.to(e3, 1, {scaleX:2}, tl.recent().endTime() + 3);//inserts the new tween 3 seconds after the e2 tween which was added most recently.
Copyright 2017, GreenSock. All rights reserved. This work is subject to theterms of useor for Club GreenSock members, the software agreement that was issued with the membership.
×