Reputation: 190941
I have the following layer structure in Flash:
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;
}
Upvotes: 2
Views: 3539
Reputation: 190941
While looking something else up, I found this.
Spotlight.mouseEnabled = false;
Spotlight.mouseChildren = false;
Upvotes: 7