我有以下代码通过AS2中的单独窗口(通过按钮操作)打开文档:
mapSym_btn.onRelease = function() {
getURL ("https://myPortal.html", "_blank")}
有人能告诉我如何在AS3中获得相同的结果吗?我很感激你的帮助。
答案 0 :(得分:2)
(未经测试的代码)
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!");
}
}