I have a component (a canvas) that has a click event listener on it. However, there is sometimes an opaque canvas that lays over that component. When that overlaying canvas is visible, I don't want the underlying component to be clickable.
Is there a way to do this without manually removing the click event listener when the overlaying canvas becomes visible and adding back the click event listener when the overlaying canvas becomes invisible?
As a side note, interestingly enough, the overlaying canvas contains label elements and when the overlaying canvas is visible, the underlaying component is only clickable for the area of the overlaying canvas where there is not a label element.
Also, since this is Flex, I should note that the click event listener was originally added through Actionscript and not through mxml.
Canvas
click event handler to see if the opaque canvasvisibility
property is set to true before running any additional code. – Jason Towne