Close Browser Window

Hi guys,

Sorry if the solution is posted somewhere already, I have done extensive searching and just can’t find an answer anywhere… I thought this would be relatively simple but it’s proving not to be.

I’m trying to simply close a Browser window from within flash… code below:

closeButton_mc.addEventListener(MouseEvent.MOUSE_UP,closeWindow);
//
function closeWindow(p_evt:MouseEvent){
 var closeWindow:URLRequest = new URLRequest("javascript:window.close();");
 navigateToURL(closeWindow);
}

When the button is clicked, the code seems to open a new browser window then close it immediately, looks like a flicker on the screen.

Any help would be greatly appreciated! :puzzle:

Fosco.