Horizontal block


with the horizontal block like at http://www.jessicasimpson.com (the block on the left hand side, sliding in front of the images)

i would like to create the same thing but also folows the mouse.
I know how to do this:

onClipEvent (load) {
_x = 0;
_y = 0;
speed = 5;
onClipEvent (enterFrame) {
endX = _root._xmouse;
endY = _root._ymouse;
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;

but i only want it to move like the one on that site, Moves only left and right and restricted only in one area like a sliding door.
I don’t want the block to be able to disappear itself if you place the mouse on the edge of the mc. Left and right only!

can neone help?