I’m trying to create my own custom drop down menu by using buttons, boxes and text.
I’ve got it all set up, the only issue is the code keeps disconnecting from the drop down boxes and I have no idea why!
This is the code I’ve done:
export function birthdayButton_mouseIn(event) {
$w( “#boxMenu1” ).show();
}
export function seasonalButton_mouseIn(event) {
$w( “#boxMenu2” ).show();
}
export function occasionButton_mouseIn(event) {
$w( “#boxMenu3” ).show();
}
export function weddingButton_mouseIn(event) {
$w( “#boxMenu4” ).show();
}
export function themedButton_mouseIn(event) {
$w( “#boxMenu5” ).show();
}
export function otherButton_mouseIn(event) {
$w( “#boxMenu6” ).show();
}
export function boxMenu2_mouseIn(event) {
$w( “#boxMenu2” ).show();
}
export function boxMenu2_mouseOut(event) {
$w( “#boxMenu2” ).hide();
}
export function boxMenu3_mouseIn(event) {
$w( “#boxMenu3” ).show();
}
export function boxMenu3_mouseOut(event) {
$w( “#boxMenu3” ).hide();
}
export function boxMenu4_mouseIn(event) {
$w( “#boxMenu4” ).show();
}
export function boxMenu4_mouseOut(event) {
$w( “#boxMenu4” ).hide();
}
export function boxMenu5_mouseIn(event) {
$w( “#boxMenu5” ).show();
}
export function boxMenu5_mouseOut(event) {
$w( “#boxMenu5” ).hide();
}
export function boxMenu6_mouseIn(event) {
$w( “#boxMenu6” ).show();
}
export function boxMenu6_mouseOut(event) {
$w( “#boxMenu6” ).hide();
}
So I have the buttons set to show the menu when you mouse in on them, then the relevant box pops up underneath with onMouseIn, then hides when you mouse out.
I’ve got it working fine in preview, then all of a sudden it seems to disconnect from the boxMenus themselves, so the coding is still there, but in the properties box there’s nothing under ‘OnMouseIn’ and ‘onMouseOut’ anymore. Then when I preview my site, the boxes don’t work properly - they stay there when you scroll over the button and don’t vanish.
This is driving me mad but I can’t find any other way to have a custom drop down menu on my site like I want I just don’t get why the code randomly disconnects from the boxes for no reason. Any help would be much appreciated!