I guess it's about easing

Hi all

I built http://www.betsytaylor.co.uk.

Fine and good.

However, the menu doesn’t work quite the way that it should. When the mouse leaves the trigger aream the menu stops dead in it’s tracks. I’d really like to gently come to a halt.

This is the code that moves the menu:

mask_mc.onEnterFrame = function ()
{
	if (_root._ymouse>235 && _root._ymouse<500) {
		this._y += (_root._ymouse-this._y)/6;
		menu_mc._y = this._y;
	}
};

Everyday there’s something new to learn - for me, today, I think it’s easing!

I’d appreciate any help to get this done.

Many thx.

Cello

yeah i’ve been through the same troublem before :beam:

a simple fix would be to get the nav bar to ease-out to some point that you specify, only when the mouse is out of that range… something like this:

mask_mc.onEnterFrame = function ()
{
    if (_root._ymouse>235 && _root._ymouse<500) {
        this._y += (_root._ymouse-this._y)/6;
        menu_mc._y = this._y;
    } else if (_root._ymouse<235 && _root._ymouse<500) {
        this._y += (200-this._y)/6;
        menu_mc._y = this._y;
} else if (_root._ymouse<5 && _root._ymouse<500) {
        this._y += (0-this._y)/6; //results in adding a negative #
        menu_mc._y = this._y;
}
};

something like that… you might need to modifiy it…

Simple once someone is kind enough to point you in the right direction!

Thanks ahmed - it works brilliantly - I just adjusted mouse trigger areas and added another else statement for mouse moves exiting the bottom of the movie.

See http://www.betsytaylor.co.uk for results.

Ur a gent - thx!

Cello