Move MC into position and stop, move again (HELP)

i’m trying to get a concept down where i can mouse over a button (“one_mc”) and “indicator_mc” will move into a certain position. Then move over another button (“two_mc”) and “indicator_mc” moves to another position.

i’m trying to use this on a navigation bar where depending on what link you scroll over, a bar will move behind the link text. If you need a sample of what i’m talking about here it is.

I just need some code to get started.

is it just me or is that fla completely empty? anyway, here’s an fla i’ve put together in the past to help people w/easing. try changing the on(release) for each button to on(rollOver).

not sure what the deal is with the file. i attached it here too.
i like what you have going on here, cna you explain the variables you are using and what they do?

also, it works good for evenly spaced positions (like your squares) but what if the positions it needs to stop at are unevenly distributed, such as _x=50, _x=100, _x=175, _x=200?

sorry…helps to attach file huh? well, seems like since i’ve attached it to the first message (start of thread) can’t do it now. go to the starrt of thread to get file. sorry?

numba is just the destination y value. divider is just the speed. basically you’re telling the mc to constantly calculate the difference between the actual y (this._y) and the destination y (numba). then it takes the difference, divides it by the speed, and adds that to the actual y (this._y).

you can set the different destinations by looking at the AS for the buttons. it will work for whatever locations you want.

right on…thanks! this is so weird, but i think we’ve had this discussion before. i don’t mean we just talked about another problem, but i think you have walked me through this same thing sometime before…odd. thanks again.


wow…i’ve got to get more sleep!