I have this code that is supposed to take an array with some words, and apply the tweens to them, one by one, with a specified timeout. I think I have to make an empty movieclip out of them and then animate them with a foreach loop with a timeout, but I’m lost in how I would do that exactly.
This is where I’m at:
var array:Array = new Array('word', 'is', 'here'); var bounce:Function = function(mc:MovieClip):void { mc.bounce1 = new Tween(mc, '_y', Bounce.easeOut, 35, 75, 1, true); mc.bounce2 = new Tween(mc, '_xscale', Bounce.easeOut, 0, 400, 4, true); mc.bounce3 = new Tween(mc, '_yscale', Bounce.easeOut, 0, 400, 4, true); mc.bounce4 = new Tween(mc, '_alpha', Regular.easeInOut, 100, 0, 2, true); }; array.forEach(bounce, me);
Could really need some assistance.
I don’t have CS3, but I whipped up a quick example using a free tweening library called Tweener. You can find it here.