What's wrong with my code?

[color=RoyalBlue][font=Courier New]onClipEvent (load) {
Mouse.hide();
this.onMouseDown = function() {
if(_root.navbar._visible = false) {
_root.navbar._visible = true;
} else {
_root.navbar._visible = false;
}
};
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}

[color=Black][font=Arial]This is the code I used to create a custom cursor that opens or closes a menu when clicked, but it doesn’t work. can anyone help?[/font][/color]
[/font][/color]