# What's wrong with my code?

**URL:** https://forum.kirupa.com/t/whats-wrong-with-my-code/53493
**Category:** web dev
**Created:** [June 4, 2004, 9:52am UTC](https://forum.kirupa.com/t/whats-wrong-with-my-code/53493 "2004-06-04T09:52:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![innoxist](https://avatars.discourse-cdn.com/v4/letter/i/a88e4f/32.png) [@innoxist](https://forum.kirupa.com/u/innoxist)
#### Post date: [June 4, 2004, 9:52am UTC](https://forum.kirupa.com/t/whats-wrong-with-my-code/53493/1 "2004-06-04T09:52:30Z")

</div>

[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]
