I've got two sprites of identical size, both the full dimensions of the stage. I want the first to exit the stage with the same tween as the second one enters the stage with no visual gap between them.
The following code creates two simple sprites and creates for each an identical three tween timeline. The first tween brings the sprite on, the second pauses for a few seconds and does nothing, then the third sends the sprite off and restarts the timeline of the other sprite. This loops. The problem is that there is a varying visual gap between the the sprites as one tweens off and the next tweens on.
You can paste this example code into a new empty flash movie and watch it:
import com.greensock.*;
import com.greensock.easing.*;
// Just create 2 colored rect sprites the size of the stage and position them off the top of the stage
var a1s = createShape(0x000077, stage.stageWidth, stage.stageHeight);
var a2s = createShape(0x003300, stage.stageWidth, stage.stageHeight);
var a1 = new Sprite(); a1.addChild(a1s);
var a2 = new Sprite(); a2.addChild(a2s);
a1.y = stage.stageHeight * -1;
a2.y = stage.stageHeight * -1;
addChild(a1);
addChild(a2);
// Now create two timelines to drop them down with a bounce in sequence with a 4 second pause between
// the end of the pause phase for each restarts the timeline of the other
var t1 = new TimelineLite({paused:true});
var t2 = new TimelineLite({paused:true});
t1.append(new TweenLite(a1,2,{ y:0, ease:Bounce.easeOut}));
t1.append(new TweenLite(a1,4,{ }));
t1.append(new TweenLite(a1,2,{onStart:function() { t2.currentProgress=0; },y:stage.stageHeight, ease:Bounce.easeOut}));
t2.append(new TweenLite(a2,2,{ y:0, ease:Bounce.easeOut }));
t2.append(new TweenLite(a2,4,{ }));
t2.append(new TweenLite(a2,2,{onStart:function() { t1.currentProgress=0; },y:stage.stageHeight, ease:Bounce.easeOut}))
t2.gotoAndPlay(t2.duration);
t1.gotoAndPlay(0);
function createShape( color: int, w: int, h: int ): Shape
{
var shape: Shape = new Shape();
shape.graphics.beginFill( color );
shape.graphics.drawRect( 0, 0, w, h );
shape.graphics.endFill();
return shape;
}