I have the following layer structure in Flash:
- Spotlight - Has a transparent center area, is a bitmap symbol
- Button
How do I make Button
clickable even though the Spotlight
layer? I want to toggle the visibility of the Spotlight
layer with the click of Button
like the following code.
Button.addEventListener(MouseEvent.MOUSE_CLICK, OnClick);
function OnClick(e:MouseEvent):void
{
Spotlight.visible = !Spotlight.visible;
}