Flash actionscript 3.0: pop up window in flash using AS3.0

pop up window in flash using AS3.0

Posted by Sankar.G | Posted in | Posted on 2:32 PM

Below Code is useful to you to open a popup window in flash using AS3.0

import flash.net.URLRequest;
test_btn.addEventListener(MouseEvent.CLICK,fun);
function fun(event:MouseEvent):void
{
var address:String = "http://www.google.com";
var jscommand:String = "window.open('" + address + "','PopUpWindow','height=600,width=600,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0');";
var url:URLRequest = new URLRequest("javascript:" + jscommand + " void(0);");
navigateToURL(url,"_parent");
}

Comments (1)

Useful and simple. One of rare scripts addressing this matter that actually works. Cheers!