Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening a URL from Flash using navigateToURL (AS3)

Been pulling my hair out for hours today over this. I can't open another website from my already opened flash site.

Here is the code:

GotoFB.addEventListener(MouseEvent.CLICK, gotoFB);

function gotoFB(event:MouseEvent):void
{

    navigateToURL(new URLRequest("http://www.facebook.com"), "_blank");
}

This works from the flash player but not from chrome/ie/firefox..

like image 535
Nebula Avatar asked Jan 10 '12 13:01

Nebula


1 Answers

Had some problems with navigateToUrl in recent chrome-update in my Flex-app. Had to use this workaround:

ExternalInterface.call("window.open", url, target);
like image 57
Niels Bosma Avatar answered Sep 22 '22 20:09

Niels Bosma