Hello all,
I'm trying to add multiple images to a blank movie clip on my stage using the addChild method in an array. After many hours I got it almost working. The only problem now is that all of my arrayed images tween at the same time. They don't stagger. Is there any way to take the code that I have done and have each image tween, then the next, and so forth? I also need the timeline to repeat indefinately after all arrayed images have finished (which is why I have nested timelines).
Thank you!
var myTimelineCardMain:TimelineMax = new TimelineMax({repeat:-1});
var sArray:Array = []
var imgBD:BitmapData=new card_28(315,355);
var card1:Bitmap=new Bitmap(imgBD);
card1.x = -315;
card1.y = -355;
var img1BD:BitmapData=new card_21(315,355);
var card2:Bitmap=new Bitmap(img1BD);
card2.x = -315;
card2.y = -355;
sArray.push(card1,card2);
for(var i:int = 0; i < sArray.length; i++)
{
card_main.addChild(sArray[i]);
}
var myTimelineCard:TimelineLite = new TimelineLite();
myTimelineCard.insertMultiple([new TweenLite(card_main, 0, {y:467, x:920}),
new TweenLite(card_main, 3, {rotation:-9, ease:Back.easeOut}),
new TweenLite(card_main, 3, {delay:3, rotation:200, ease:Back.easeOut})], 0, "sequence");
myTimelineCardMain.insertMultiple([myTimelineCard], 0, TweenAlign.SEQUENCE, 3);