as3 question

Hi im new with actionscript an im stuck. And was wondering someone here could help me with this.

Ive called some movieclips on stage with AS to a random position. If you click on the movieclip it goes to the center. And if you click the same clip when it is in the center it goes back to a random position

But what i want is that if you click any of the buttons while there is a movieclip in the center. That the movieclip in the center goes back to a random position and the clicked one goes to the center.

thanks in advance.

my as :

import fl.transitions.Tween;
import fl.transitions.easing.*;
var rArray:Array = new Array();
var clip:MovieClip;

function Main() {
for (var i:int = 0; i < 6; i++) {
var newCircle:BlueCircle = new BlueCircle();
newCircle.x=50+Math.random()*1300;
newCircle.y=285+Math.random()*200;
newCircle.scaleX=newCircle.scaleY=1;
newCircle.addEventListener(MouseEvent.ROLL_OVER, onBtn);
newCircle.addEventListener(MouseEvent.CLICK, klik);
this.addChild(newCircle);
rArray.push(newCircle);
}
}
Main();

function onBtn(e:MouseEvent):void {
clip=e.target as MovieClip;
this.addChild(e.currentTarget as MovieClip);
}

function klik(e:MouseEvent):void {

if (clip.x==stage.stageWidth/2) {
	var myTween3:Tween=new Tween(clip,"x",Back.easeOut,clip.x,50+Math.random()*1300,1,true);
	var myTween4:Tween=new Tween(clip,"y",Back.easeOut,clip.y,100+Math.random()*600,1,true);
} else {
	var myTween3:Tween=new Tween(clip,"x",Back.easeOut,clip.x,stage.stageWidth/2,1,true);
	var myTween4:Tween=new Tween(clip,"y",Back.easeOut,clip.y,stage.stageHeight/2,1,true);

}

}

rArray[0].ldr.source="…/images/image2.jpg";
rArray[1].ldr.source="…/images/image2.jpg";
rArray[2].ldr.source="…/images/image3.jpg";
rArray[3].ldr.source="…/images/image4.jpg";
rArray[4].ldr.source="…/images/image5.jpg";
rArray[5].ldr.source="…/images/image6.jpg";
rArray[6].ldr.source="…/images/image7.jpg";