Reputation: 1
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.
Upvotes: 0
Views: 155
Reputation: 11610
(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!");
}
}
Upvotes: 2