Reputation: 23419
All I need to open a new IE Window from within Flex code on click of a link.
P.S I dont want to open a new Browser. I want to open a browser window only that can open a new URL.
Something like clicking on a link in Flex and then open cnnibn.com in a Pop up window.
Upvotes: 0
Views: 502
Reputation: 3214
You should just be able to use:
navigateToURL(new URLRequest('http://www.cnnibn.com'), '_blank');
(make sure you import the relevant packages: "import flash.net.*")
This approach may have issues with some popup blockers, if so then you could have a look at the class here:
http://www.zorked.com/flash/flash-and-navigatetourl-popup-blocking/
Upvotes: 2
Reputation: 59471
One of the following methods will work unless the popup blocker blocks it.
navigateToURL
Add the following to the click handler of the button
navigateToURL(new URLRequest("cnnibn.com"), "_blank");
ExternalInterface
Add this line to click handler
ExternalInterface.call("openPopup", "cnnibn.com");
And the following to a script tag in the embedding html page
function openPopup(url)
{
window.open(url, "_blank");
}
Upvotes: 1