Those links were a great help, thanks. The arrays are a great thing.
Regarding the code, I'll do you one better. Finally figured out how I can just change the index, so that at the end I'm still left with just 10 Rurs, and not 20. Check it out if you're interested.
-Jon
import com.greensock.*;
import com.greensock.easing.*;
var rurMax:Number = 10;
var stackHeight:Number = 100;
var spacing: Number = stackHeight / (rurMax - 1);
var speed:Number = 1;
var stack1X:Number = 100;
var stack1Y:Number = 200;
var stack2X:Number = stage.stageWidth - 100;
var stack2Y:Number = 300;
// the master timeline
var tl:TimelineMax=new TimelineMax();
// creates a stack of Rurs and flies them individually to new stack location
function flyingRurs()
{
for (var i:int = 0; i {
// create a Rur (attach symbol in library with Class Rur) and position on stage
var rur:Rur=new Rur();
rur.x = stack1X;
rur.y = stack1Y + i * spacing;
addChildAt(rur, 0);
var nestedTl:TimelineMax = new TimelineMax();
nestedTl.insert(TweenMax.to(rur, speed, {x:stack2X, y:stack2Y - i*spacing, ease:Circ.easeInOut}));
nestedTl.addCallback(moveUpFront, speed/2, [rur]); // brings the Rur up front so it stacks correctly
tl.append(nestedTl, -speed*.75);
}
}
function moveUpFront( clip:DisplayObject ):void {
clip.parent.setChildIndex(clip, clip.parent.numChildren-1);
}
flyingRurs();