views:

1139

answers:

2

We've been creating banners using the getURL linking method (in a blank window). For many people, it works just fine. You click the banner and are taken to our site. For others (me included), clicking the flash object triggers a pop-up warning in FireFox (both 2 and 3, default settings). The weird thing is that it doesn't happen for everyone. It happens on my main machine (vista 64, FF3) but not on my secondary machine (XP 64, FF3). I have other people running Vista/FF3 just like me, and it's working fine for them...but not me.

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

We're pretty stumped and have no idea why this is happening. Any feedback would be greatly appreicated.

+2  A: 

In my experience you need to put your link inside a onRelease handler (or MouseEvent.CLICK in as3) for it to not get blocked. If you set it to onPress or anything else will it will be blocked. This isn't foolproof on some setups it will get blocked anyway, but often that's due to a tougher setting on the blocker or something like that.

grapefrukt
in as3, MouseEvent.CLICK will still cause a pop up blocker to detect it
Jeff Winkworth
A: 

Use this code, with allowscriptaccess='always' and wmode='transparant' or 'opaque' in the HTML code on 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); 
    }
}
Pascal Immerzeel
We choose to go back to AS2 again for simple sales banners. Mainly because of this problem.Also most banner hosting providers don't support AS3(!).We do use it for Rich Media Layers/Expandables and other formats, because the hosting provider for those banners supports it.
Pascal Immerzeel