How does an event listener work?

I’m having trouble finding a tutorial or article that can eloquently explain what exactly an event listener does and why it’s useful. Can anyone elaborate for me? So far this is what I understand about them:[INDENT] They’re good for making sure an event has completely occurred before a script moves on to the next procedure.
[/INDENT]So, for example, I’m creating a flash game that sends your name and your score to a mysql database at the end of the game, then displays the top ten highest scores in the database using XML nodes. A friend of mine was saying that if I don’t use an event listener for the loadvars sendAndLoad event, that the script might move too fast before it has time to include a player’s score in the high score list (if it’s top ten) in any given game. So I think he’s right because sometimes I’ll get a high score and it won’t update in the list before I used this addEventListener. Or so I think. How can I really tell if it’s really working? Am I using the addEventListener correctly here:


// Here's where I use the LoadVars object to send the player's name and score to the database
var mySender = new LoadVars();
var myReceiver=new LoadVars();
myReceiver.onLoad = function(success) {
    if(success){
        trace("added");
    }
}
mySender.playername = _root.playername;
mySender.score = score;
mySender.sendAndLoad("addscores.php",myReceiver,"POST");
mySender.addEventListener("sendAndLoad", myReceiver.onLoad); // Am I using the addEventListener correctly?


// Here's where I grab the XML nodes from the php script....    
scores_xml = new XML();
scores_xml.onLoad = getScores;
scores_xml.load("addscores.php");
scores_xml.ignoreWhite = true;