0

I have the following code to open a document through a separate window (through a button action) in AS2:

mapSym_btn.onRelease = function() {
getURL ("https://myPortal.html", "_blank")}

Can anyone show me how to get the same results in AS3? I'd appreciate any assistance.

ToddBFisher
  • 11,370
  • 8
  • 38
  • 54

1 Answers1

2

(untested code)

mapSym_btn.addEventListener(MouseEvent.CLICK, goSomewhere);
function goSomewhere(evt:MouseEvent):void {
   var request:URLRequest = new URLRequest("https://myPortal.html");
   try{        
      navigateToURL(request, "_blank")
   } catch(e:Error){
      trace("Ah snap, there was a problem!");
   }
}
ToddBFisher
  • 11,370
  • 8
  • 38
  • 54