Flash: How can I Disable or block all mouse events temporarily for an externally loaded SWF

actionscript, flash

Solution

A common solution to this kind of problem in ActionScript 2 is what is often called a "blocker" clip. Simply create a movieclip that consists of a fully transparent fill. Then you can place this movieclip where ever you want and size it as needed. Finally you assign this clip a dummy mouse event and turn off it's use of the hand cursor - like this:

blocker.onRelease = function() {};
blocker.useHandCursor = false;

As long as this clip is above your loaded content, it will absorb any mouse events.

Problem

I have SWF files that I load into my flash movie and those SWF files sometimes have mouse events that can interfere with dialogs and buttons in my flash movie. I'd like to temporarily disable the loaded SWFs mouse event handlers or block them from having any effects on my flash movie. My flash movie is AS 2.

Original source