I have a bunch of buttons within a viewport when you click the button (using onClick) the location moves on a map to that button’s location. However, is there a way so that when you hover over the button an image can appear and disappear once you hover away?
I figured it out! Just had to make sure when I added the image to the viewport to select “hidden on load”. Also had to make a command for both MouseIn and MouseOut function otherwise it just stays there. I used the code below if anyone else is looking for a simplistic solution for novice coders!
export function button24_mouseIn(event) {
if ( $w('#imagename').hidden ) {
$w('#imagename').show();
}
else {
$w('#imagename').hide();
}
}
export function button24_mouseOut(event) {
if ( $w('#imagename').isVisible ) {
$w('#imagename').hide();
}
else {
$w('#imagename').show();
}
}