If hit Test

Hi can some one help in hitTest

i just wana doo that if mc hit left side it goes right side and if hit right side it goes left side same in up and down

Here is my code
if(_root[“leaf”+mycount+" “+mycount1].hitTest(_root.fly_mc)){
var boxX:Number=_root[“leaf”+mycount+” “+mycount1]._x;
var boxY:Number=_root[“leaf”+mycount+” "+mycount1]._y;

var RBoxX:Number=fly_mc._x - boxX;
var RBoxY:Number=fly_mc._y - boxY ;

var tweens=new Tween(_root[“leaf”+mycount+" “+mycount1],”_x", Strong.easeOut, fly_mc._x, 200, 1, true);
var tweene=new Tween(_root[“leaf”+mycount+" “+mycount1],”_y", Strong.easeOut, fly_mc._y, 0, 1, true);