Sliding Menu Control

I’m hoping someone can help me. I am a newbie to flash and have found these threads very, very helpful. I almost have my project done, but would like to do one last tweak.

I created a sliding menu using the infinite menu tutorial, but I would like it to slide at a constant speed if the user moves outside the masked area. I tried the actionscript provided for the hit test, but cannot get it to work for my project, can you please help?

I have two layers on is a mask and the second is a filmstrip. The file is only 1 frame long. I cannot seam to integrate the actionscript from the controlling a sliding show thread into my movie. The following is the script that I have on my filmstrip.

onClipEvent (load) {
xcenter = 393;
speed = 1/50;

onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
_x -= (distance*speed);
if (_x>0) {
_x = -1656;
easeSpeed = 2
if (_x<-1656) {
_x = 0;
easeSpeed = 2
if(_root.mask.hitTest(_root._xmouse,_root._ymouse)) {
_x -=5;

Thanks again for any help.