How to achieve this effect?

There are now three pictures, the ID of the first picture is picture A, the ID of the second picture is picture B, and the ID of the third picture is picture C,

Now the mouse pointer is placed on the picture A. When the mouse leaves the picture A and moves to the picture B within 1 second, the picture C will not disappear; otherwise, if the mouse leaves the picture A and does not move to the picture B within 1 second, picture C will disappear. How to achieve this effect?

Thanks

You can try something like:

let validator = 0;
$w("#pictureA").onMouseOut((event) => {
    validator = 1;
    setTimeout(() => {
        if(validator === 1){
            $w("#pictureC").hide();
        }
    }, 1000)///1000ms === 1s
})
$w("#pictureB").onMouseIn((event) => {
    validator = 0;
})

[[fixed - shorter]