Flash banners conflicting with pop-up blockers?

We create banners using the getURL link method (to an empty window). For many, this works great. You click on the banner and get to our website. For others (including me), clicking on the flash object triggers a pop-up warning in FireFox (both values ​​2 and 3 by default). The strange thing is that this does not happen to everyone. This happens on my primary machine (vista 64, FF3), but not on my secondary machine (XP 64, FF3). I have other people working with Vista / FF3, just like me, and it works great for them ... but not me.

For example, the 300x250 banner on the left side of this page: http://www.jguitar.com/

We are very excited and have no idea why this is happening. Any feedback will be greatly facilitated.

+3
source share
2 answers

In my experience, you need to put your link inside the onRelease handler (or MouseEvent.CLICK in as3) so that it does not block. If you install it on onPress or anything else, it will be blocked. This is not reliable in some settings, and in any case it will be blocked, but often this is due to a tighter blocker setting or something like that.

+2
source

Use this code with allowcriptaccess = 'always' and wmode = 'transparentant' or 'opaque' in the HTML code for the Flash Element.

private function click(event : MouseEvent) : void {
    getURL(LoaderInfo(root.loaderInfo).parameters.clic kTag);
}

private function getURL(url : String, window : String = "_blank") : void { 
    var browser : String = ExternalInterface.call("function getBrowser(){return 
    navigator.userAgent}") as String; 

    if (browser.indexOf("Firefox") != -1 || browser.indexOf("MSIE 7.0") != -1) { 
        ExternalInterface.call('window.open("' + url + '","' + window + '")'); 
    } else { 
       navigateToURL(new URLRequest(url), window); 
    }
}
0
source

Source: https://habr.com/ru/post/1697836/


All Articles