Making a close button

Hi,

I’ve created a peice of software using flash, i want to make a button that closes the window, does anyone know how this is done?