I have a menu that I have been working on that is inside a movieClip. I want to trigger the menu to open when the mouse is in the far left hand part of the stage. The code that I have for this so far is:
leftX = 0;
topY = 0;
widthX = 10;
heightY = 600;
_root.onMouseMove = function()
{
if (this._xmouse >= leftX && this._xmouse < leftX+widthX &&
this._ymouse >= topY && this._ymouse < topY+heightY)
trace(_root.menu._currentframe);
if (_root.menu._currentframe == 30) {
stop();
}
else
{
if ( ! rolledOver ) {
menu.gotoAndPlay(“open”);
}
}
}
The code was working fine before I put in the trace function, but I would really like to have this so that if the menu is already open it won’t go and play again.
What is happening now is if the mouse is moved just a little the code exicutes, and plays the menu MC.
Can anyone figure out a remedy for this problem?