8/26/2011

as3 用as+java在瀏覽器開指定大小視窗


original code from
http://www.actionscript.org/forums/showthread.php3?t=161162
//htm裡面要放
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>

//flash裡面as這樣寫
private function viewPopup(e:MouseEvent) {                  var address:String = "http://www.link.com/index.html";             var jscommand:String = "window.open('" + address + "','PopUpWindow','height=645,width=755,toolbar=no,scrollbars=no,resizable=yes');";             var url:URLRequest = new URLRequest("javascript:" + jscommand + " void(0);");             navigateToURL(url,"_self");         }

No comments:

Post a Comment