How to use the textInput

Hello All, I have been learning ActionScript 3 for about two weeks . I was reading the Adobe documentation in regards to the TextInput component. I was a little confused. I want to create a login system for my website. I have two TextInput fields for a username and password that’s it! . My question is, to validate that the username and password are entered correctly and to dispatch the details to a MySQL database which textInput event am I required to use? Would Event.COMPLETE alone handle all this or would be it necessary to use more than one Event? Thank You