as3: close window

[ 2009-12-07 20:03:07 | Author: liuhuan ]
Font Size: Large | Medium | Small
To close window in as3:
btn.addEventListener(MouseEvent.MOUSE_DOWN,onMouseDownHandler);

function onMouseDownHandler(e:MouseEvent):void {
  var jscommand:String = "window.close();";
  var req:URLRequest = new URLRequest("javascript:" + jscommand + " void(0);");
  navigateToURL(req, "_self");
}
Comments Feed Comments Feed: http://www.liuhuan.com/blog/feed.asp?q=comment&id=1029

There is no comment on this article.

You can't post comment on this article.