5 Replies Latest reply on May 2, 2008 7:00 AM by Kees_Kist

    How to prevent blocking of popups

      Since a recent Firefox update I've noticed that the included popup blocker is now doing its job a little too well. It now blocks all popups that are launched from my SWF. Of course you can still get to the new window by selecting "allow for this website", but this is not very user-friendly.

      I think that Firefox blocks all popups unless it thinks that they are a direct result of a mouse click. When you make an event handler with on (release) { } and launch the new window from there, it will not be blocked. However, when you dynamically create that event handler, by declaring <myMovieClip>.onRelease=function() { } somewhere midway, it will be blocked. I've tried to avoid this by calling a JavaScript function which in turn opens the popup, which also doesn't give the intended result.

      Obviously the popup blocker is just doing its job, but in this case I just want to have some way to create a new window from a MovieClip, and have it not blocked.
        • 1. Re: How to prevent blocking of popups
          clbeech Level 3
          well that's not exactly correct, it's not the AS methods that are being blocked, it is the JS call to construct a new window object - we of course trigger this method when using the handlers but it is not the AS that is the cause. But I do agree that in certain situations this may be less user freindly - however a message to the user may be appropriate if there is no other way around the issue for you.

          I would recommend though that you consider a work around for this. One example would be the simply construct a viewing window within you flash file and load the content into it with the MovieClipLoader method (or URLLoader if AS3) in fact one could even create a 'pseudo window' that has a frame and everything and simply 'floats' at a higher depth above the rest of the stage content - you could even create a swf just for this purpose and reuse the same one for all loads passing parameters in your call to set up the window. hmmm.... maybe I'll make a component out of that... lol!!

          Just thoughts :)
          • 2. Re: How to prevent blocking of popups
            kglad Adobe Community Professional & MVP
            you're too late clb. check your components' panel for the window component.
            • 3. Re: How to prevent blocking of popups
              clbeech Level 3
              lmao kg :)
              • 4. How to prevent blocking of popups
                Kees_Kist Level 1
                This would provide a reasonable alternative, but the trick in this particular case is that the popup window needs to contain an external web page, so I can't really use the Window component as it can only contain Flash contents.

                I'm quite sure that there is a way of creating event handlers without triggering the popup blocker. I'm going to experiment a bit more, and should I find anything I'll post it back here.
                • 5. Re: How to prevent blocking of popups
                  Kees_Kist Level 1
                  Bizarrely, these popups are only blocked when using Firefox with Flash Player When you update to the latest version,, the problem does not occur. Weird..but at least it will fix itself once everyone has updated to the latest version.