October 25th, 2007

Flash:How to successfully open a new window in Firefox w/o being blocked???

I have tried unsuccessfully in ActionScript 3 to open a new window within my Flash app using navigateToURL w/o triggering the Firefox pop-up blocker.  This is a desired action by the user, triggered by MouseEvent.CLICK, allowScriptAccess=true,  and based on Firefox’s dom.popup_allowed_events, it should work w/o being blocked.  I’ve googled other possibilities (http://skovalyov.blogspot.com/2007/01/how-to-prevent-pop-up-blocking-in.html) but haven’t found a single option that appears to work correctly for me.   The other detail of this is that the HTML is loading the SWF and all the content from another domain, which works perfectly. Its just that Firefox is giving me fits.

Anyone got any better ideas?   

5 Responses to “Flash:How to successfully open a new window in Firefox w/o being blocked???”

  • Or: How to successfully annoy users, against peoples settings

  • Evert -
    If the person clicks a link in the Flash app, its their choice, and shouldn’t be over-ridden by the browser.

  • Hi, thanks for the post - just FYI, “true” is not a valid param for script access. There are only 3 values, “always” “never” “sameDomain”. I have never had a problem opening up a new window in FF w/ AS3. Have you tried on different systems?

  • Sorry.. that was a typo in the post and not in my HTML. I was typing at a different speed than I was thinking. yes.. allowScriptAccess=”always”

    Opening the new window works fine in other browsers. And it “works” in Firefox, but the new window gets caught in the pop-up blocker. The user has the option to add the site to Firefox’s trust site list, but I’d prefer (and my client would prefer) to not have the user go through that step for a choice the user made. This isn’t non-prompted spam ads, but a user’s choice to open the new window.

    You can see an example here: http://www.yapiodesign.com/test/test4.html
    allowScriptAccess is set to always. I’ve added a MouseEvent.CLICK event handler on both the onscreen graphic and the SWF that gets loaded in. Both trigger the pop-up blocker message in FF “Firefox prevented tehis site from opening a pop-up window”.

  • I’m having the exact same problem…
    I hope someone out there has a clue.