AS3 has brought a lot of new functionality and complexity to flash development. It has also brought some new problems.
Pop up blocking is simple principle where only user initiated events can open a new window. In the case of AS2 when creating a link it had to be triggered from an onRelease/Click event. Other wise in AS2 “getURL” was adequate in any browser. Unfortunately “navigateToURL” in AS3 does not seem to be useful across all browsers as even on Click it can still be pop up blocked.
In my mission to get a flash only solution for opening URLs that don’t get pop up blocked, I found ExternalInterface call to “window.open” works as long as its available in the browser. The basics of the code I used is below.
//set the desired URL here
var url_str:String = "http://www.yoururl.com"
//checks to see if the browser has JS on and
//if ExternalInterface is compatible with the browser
//calls the JS function "window.open" in a new window
ExternalInterface.call( "window.open", url_str, "_blank" );
//the fall back call is "navigateToURL"
var urlRequest:URLRequest = new URLRequest(url_str);