Click here to Skip to main content
15,867,141 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I need help in writing code associated to a button that closes the current browser window.
Posted
Updated 31-Oct-11 7:11am
v2
Comments
Nish Nishant 31-Oct-11 13:11pm    
Edited your question so it's easier to understand.

Assuming you want to close the browser window from Flash, people use Javascript to do that.

See these links:

http://www.flashdesignerzone.com/tutorials/t1022.php[^]

http://www.flashdesignerzone.com/tutorials/t1041.php[^]
 
Share this answer
 
Comments
Espen Harlinn 31-Oct-11 15:53pm    
If OP called window.close(); and not 'quit' http://www.w3schools.com/jsref/met_win_close.asp
Hmm, it should have worked, anyway, my 5
There is no such concept as "exit a window".

—SA
 
Share this answer
 
btn_c.addEventListener(MouseEvent.CLICK,Close);
function Close(event:MouseEvent):void {
fscommand("quit", true);
}



i wrote this one but it doesn't work ???!!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900