Archive for the ‘Bug’ Category

navigateToURL and popup blockers

Monday, March 3rd, 2008

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.