Creating a close button

I am doing some software in flash, and i want to make a button that closes the window, does anyone know how this is done?