Elastic mouse follow - X axis

Hello.
I’m currently creating a navigation bar for a project using flash cs4, action script 3.

As you can see in the picture there is a navigation bar, and inside this bar there is a small rectangle and two lines (located at the first located at x=25 and the second x=555).

I want the rectangle to follow the mouse but be slightly delayed (elastic?)… Another requirement is that rectangle only moves on the x axis and therefore the y axis doesn’t change(it is y=68), but doesn’t move further than the two lines. The rectangle is a movie clip and its name is ‘rectangle’

I pretty much want it exactly the same as this http://www.spoono.com/flash/tutorials/tutorial.php?id=24
except the ball can only move on the x-axis and in between the two lines.

I really hope this makes sense…
I would really appreciate any help I can get.

Thanks,
Joel.