How to control direction of a movieclip

How can I control the x and y direction of this movieclip by rolling over a separate button or movieclip to change the direction?

on(RollOver){
this.stopped = true
}
on(RollOut){
this.stopped = false
}
onClipEvent(enterFrame) {
if(!this.stopped){
speed = 2;
this._x -= speed;
}
}