Hi there, I’m trying to create a rule where when I mouse out of a button ‘buttonServiceExpanded’, if the cursor has moved into the region ‘ServicesMenu’ then the ‘MegaMenu’ state changes to ‘MenuExpandedServices’…otherwise its state changes to ‘MenuCollapsed,’
See my code below, I hope that helps. I think what I have wrong is the second line of code (the ‘if’ rule). Can anyone help? I’m hoping its just something really simple I’ve missed, I’m very new to this and trying to learn. Thanks in advance.
export function buttonServicesExpanded_mouseOut(event) {
if (ServicesMenu_mouseIn) {
$w('#MegaMenu').changeState("MenuExpandedServices");
}
else {
$w('#MegaMenu').changeState("MenuCollapsed");
}
}