var center = Stage.width/2;
var speed = .05;
function activateMenu() {
menu.onEnterFrame = function() {
var distance = _root._xmouse-center;
if (mask.hitTest(_root._xmouse, _root._ymouse)) {
this._x += (distance*speed);
if (this._x<-sub_menu._width/2) {
this._x = 0;
}
if (this._x>0) {
this._x = -sub_menu._width/2;
}
}
};
}