Hi all,
I have 3 MCs on my stage, and I am applying motion tween for all of them dynamically, in this way:
var nav_array:Array = new Array("Home", "About", "Info");
for (var i:int=0; i<nav_array.length; i++) {
var objeto = this["my_mc"+i];
objeto.navText.text = nav_array*;
var efeito = "x";
var anima = Strong.easeInOut;
var pos_ini = objeto.x;
var pos_fin = objeto.x+200;
objeto.myTween = new Tween(objeto, efeito, anima, pos_ini,pos_fin, 1, true);
objeto.myTween.stop();
objeto.addEventListener(MouseEvent.CLICK, onClick);
}
function onClick(e:MouseEvent):void {
var objeto2:MovieClip = e.currentTarget as MovieClip
objeto2.myTween.start();
trace(objeto2.name);
}
However, as you see, I’m considering only the current movieclip.
Now, I need to alter this code to the follow situations:
[LIST=1]
[]When any MC is clicked, Motion Tween would be applied to all, including the current object
[]When any MC is clicked, Motion Tween would be applied to all, except the current object
[/LIST]
What are changes needed in my code to meet the above situations?
Thanks for any help.