Simple Scripted MC Movement/Easing

Okay, I quit. I’ve tried incrementing _x, startDrag’s with easing…nothing. Anyone that can help explain how to code the little red bar for the navigation on this site ( http://www.brandnewrock.com/index.php ) will become my hero.

I’m kind of new, kind of not new…which is why I feel like an *** posting this question, because I SHOULD KNOW THIS.

mmm…

Do you think you could post the fla of this?

I am trying to figure out how to implement the code you posted… :stuck_out_tongue:

It’s such a task to decrypt AS.

Well…no. Takes too much time to compile an FLA from this. You can see what it does here: emptyproductions.com/new

Basically, you have a buttons that – when moused over – instructs the barMC (“underline” as it’s called above) to move underneath the proper MC, adjusting it’s width to fit the width of the button it’s under and easing into place using a custom method.

Once one/all/any of the links are moused over and the mouse is no longer over any of the MCs, then a setInterval is called that eases the underline back offscreen after a set amount of time.

The if/then function is to determine whether the mouse is over the links or not.

The setInterval eases the underline out of view and is called when the mouse is no longer over any of the navigation MCs.

I’ll try to post an FLA later tonight, I guess. Hope this explanation helps a bit.

Okay, I built a sample FLA using the above code, and compiled a SWF demo. You can download the FLA and view the demo at:
www.emptyproductions.com/kirupa/easingUnderline

Hope this all helps, and I’d love to see what you do with the code!

Wow… Thanks!

I am going to have a go and see if I can make a menu system out of this… Thanks. :slight_smile:

Ah… that FLA is corrupt reading as an “Unexpected file error” :frowning:

Must be a mx04 file, it opened fine for me. I saved as mx, try this one.

Adam

No way… thanks Adam14… this is major for me

:slight_smile:
I will begin learning all the pieces to it.