Closing a pop up in Action Script 3

I’m having some problems closing the pop window[COLOR=Black].[/COLOR] If anyone know another way please let me know[URL=“http://game-poker-online.tripod.com/casino-game-online-play-poker-top.html”]..

Here is what i did in action script 2

stop();

exitbut.onPress = function(){
getURL(“javascriptarent.close()”);
};

Here is what i’m trying in sction script 3

exit_but.addEventListener(MouseEvent.CLICK, closeWin);

function closeWin (e:MouseEvent):void {
navigateToURL(new URLRequest(“javascript:window.close()”), “_self”);
}

I’m looking for a better way .. this way seem buggEEE. If anyone can help I would be so grateful. Anna