moving object smoothly by pressing button


I have a menu bar with three buttons and an object(movie clip) above them.
What I want is:
  1. by pressing the button the object to move and stay above the pressed button.
  2.when roll-over a button the object moves smoothly above it. Like tweening.

What I did was I change the _x coordinate but it goes very quickly.

Thanks in advance!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mihaylinaAuthor Commented:

Thanks for sending me this solution. I still have a question: I can sort of gigure out your idea but I can't find where the following properties are defined: startx, endx, rames?

this is the script assigned to the moving rectangle:

      this.startx = this.endx = this._x;
      this.frames = 5;
      // this is the decelerated motum formula
      this._x += (this.endx - this._x) / this.frames;

buttons change this variables with:

      this._parent.moving.endx = this._x;
      this._parent.moving.endx = this._parent.moving.startx;
      this._parent.moving.endx = this._parent.moving.startx = this._x;
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

mihaylinaAuthor Commented:

Now I am trying to add a scroll bar down but it doesn't appear. When I create a new document everything is fine. But with the one with your code I cannot see the scroll bar. What is the problem? Thanks
What kind of scrollbar?
mihaylinaAuthor Commented:
I found the problem.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.