Hello everyone !
I have my game in a browser window (incredible !).
I put a red cross in top of my game and want that it close the window.
I’m using the following code :
close_btn.addEventListener(MouseEvent.CLICK,close_window);
function close_window(evt:MouseEvent)
{
ExternalInterface.call("window.close()");
}
and the js console answer :
Scripts may not close windows that were not opened by script.
any trick ?
thank you !