Skip to main content
Known Participant
May 1, 2008
Question

How to prevent blocking of popups

  • May 1, 2008
  • 3 replies
  • 487 views
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.
This topic has been closed for replies.

3 replies

clbeech
Inspiring
May 1, 2008
lmao kg :)
Kees_KistAuthor
Known Participant
May 2, 2008
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.
Kees_KistAuthor
Known Participant
May 2, 2008
Bizarrely, these popups are only blocked when using Firefox 2.0.0.13 with Flash Player 9.0.115.0. When you update to the latest version, 9.0.124.0, the problem does not occur. Weird..but at least it will fix itself once everyone has updated to the latest version.
kglad
Community Expert
Community Expert
May 1, 2008
you're too late clb. check your components' panel for the window component.
clbeech
Inspiring
May 1, 2008
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 :)