How to make an object fade after user enter his details

This is my first query at any flash forums. I have a assignment where the name and password textfield is on the moon designed on the screen.
As the user enters his name and password then presses enter the moon has to fade away so another animation can take place.

Is there some action script…that flash recognizes that user typed and pressed entered event then moon fading takes places?.

I know this must be silly, but I don’t know how to do this.