0

AS2 の別のウィンドウ (ボタン アクション) からドキュメントを開く次のコードがあります。

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

AS3 で同じ結果を得る方法を教えてもらえますか? 助けていただければ幸いです。

4

1 に答える 1

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!");
   }
}
于 2011-12-05T23:26:41.377 に答える