Mouseover events pass through my MIAW to the stage below, what can I do?
It is true that the mouseover event leaks through any MIAW to MIAWs and the stage below. This can cause very user-unfriendly situations like sounds appearing for no clear reason (mouseover on a button hidden behind the MIAW).
I have written a script that can be used to verify that a mouseOver detected on a sprite is not hidden behind a MIAW. To use the script simply check MIAWEventLeak() - if it is TRUE a MIAW is between the mouse and the sprite and no actions should be performed.
on MIAWEventLeak
vMouse = the mouseLoc
vMouse = point((getAt(vMouse,1) + getAt((the stage).rect, 1)), (getAt(vMouse,2) + getAt((the stage).rect, 2)))
if count(the windowList) > 0 then
repeat with vWindow in (the windowList)
if vWindow.visible = TRUE then
if inside(vMouse, (vWindow).rect) then
return TRUE
end if
end if
end repeat
end if
return FALSE
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA