Eaing in a menu... (fla. attached)

hi, i’m building a menu that has an arrow that eases to the spot of the sub menu when u mouse over it. i did it very easily.
but what i want to do now is when the user roll out of a sub menu
the arrow eases to it’s original position.
so far all my tries faild…
the arrows starts “freaking out”…
any help would be appreciated…
thanks ahead…the file is in mx virsion and mx 2004…

try this:

mSpeed = 7;
MaxxScale = 140;
MaxyScale = 140;
mScale = 100;
mHome = 500;
MovieClip.prototype.mMove = function() {
	if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
		mTarget = this._x;
		mGo = true;
		this._xscale += (MaxxScale-this._xscale)/mSpeed;
		this._yscale += (MaxyScale-this._yscale)/mSpeed;
	} else {
		this._xscale -= Math.abs((mScale-this._xscale)/mSpeed);
		this._yscale -= Math.abs((mScale-this._yscale)/mSpeed);
	}
};
MovieClip.prototype.aMove = function() {
	if (mGo) {
		this._x += (mTarget-this._x)/mSpeed;
		mGo=false;
	} else {
		this._x += (mHome-this._x)/mSpeed;
	}
}
for (nNum=1; nNum<=50; nNum++) {
	_root["mc"+nNum].onEnterFrame = function() {
		this.mMove();
	};
}
_root.mcArrow.onEnterFrame = function() {
	this.aMove()
}

what I’ve done (basically) is to set a ‘home’ value. Then, a flag is set if the mouse is over one of the shapes, and the arrow target is set to that. If the flag does not get set, then the arrow target is the ‘mHome’ value.

I moved the arrow movement code onto the arrow itself. And this loop will clear the ‘mGo’ flag each time it runs.

Not my best ever bit of code, but… well, it works, that’s the main thing :wink:

Should give you an idea of how to continue.

thanks it worked!!
:slight_smile:
:slight_smile:
:slight_smile:

cool.