AS3 Open URL

2011年3月13日 星期日 by Hu, Ching-Hsiang

navigateToURL(new URLRequest("http://www.google.com.tw"), '_blank');

'_self' also

in Chinese case
navigateToURL(new URLRequest(encodeURI("http://www.google.com.tw?中文")), '_blank');

js
var js:URLRequest=new URLRequest();
js.url="javascript:window.open('award.html','popper1','width=540,height=360');newWindow.focus(); void(0);";

pop_btn.addEventListener(MouseEvent.CLICK,openPopUp);

function openPopUp(evt:MouseEvent):void{
navigateToURL(js,'_self');
}

Filed under having  

0 意見: