Working with array

thanks in advance,
i have created 4 movie clips and named (instance) them box1, box2, box3, box4 and shuffled them with the following code:

var vector_name:Array = new Array(“box1”, “box2”, “box3”, “box4”);

function shuffle(a,b):Number
{
var num : Number = Math.round(Math.random()*2)-1;
return num;
}
var shuffled_vector:Array = vector_name.sort(shuffle);
trace(shuffled_vector);

  • question is, how can i tween the instances using fl.transitions.Tween with a loop.
  • i tried the following but did not work… :frowning:

btnPlay.addEventListener(MouseEvent.CLICK, startMotion);

function startMotion(me:MouseEvent):void
{
btnPlay.visible = false;
for(var j:int = 0; j < 4; j++)
{
var twSlide:Tween;
var box = new MovieClip();
box = shuffled_vector[j];
twSlide = new Tween(box, “x”, Back.easeOut, 100+50*j, 100, 10);
}
}