Hi,
I have a function which triggers a tween for the currentTarget in an array when target is clicked but how can I trigger a tween for everything else in the array??
import com.greensock.*;
import com.greensock.easing.*;
var clipsArray:Array=new Array(mc1,mc2,mc3,mc4,mc5,mc6);
trace(clipsArray);
var clipsMargin:Number=1;
function updatePosition():void {
for (var i:uint = 0; i<=5; i++) {
if (i==0) {
clipsArray*.y=100;
} else {
clipsArray*.y=clipsArray[i-1].y+clipsArray[i-1].height+clipsMargin;
}
clipsArray*.addEventListener(MouseEvent.CLICK, setTweenClick);
/*clipsArray*.addEventListener(MouseEvent.ROLL_OUT, setTweenOut);*/
}
}
updatePosition();
function setTweenClick(e:MouseEvent):void {
TweenLite.to(e.currentTarget, 0.1, { scaleX:1.4, scaleY:1.4,ease:Circ.easeIn,onUpdate:updatePosition});
TweenLite.to([COLOR="Red"]EVERYTHING ELSE??[/COLOR], 0.1, { scaleX:1, scaleY:1,ease:Circ.easeIn});
}
Obviously, EVERYTHING ELSE means the other mc’s in the array.
Phil