Hello Maya,
Here are two forum threads that have discussions about onEvents and how they work. Hope this helps.