Fade in and out

Hello,
I have a window in flash and i would like it when it opens to fade in (alpha 0 to 100) and then out(and then closing) when pressing the close button, how can i do?