handler
handler
A block of statements, contained in the script of an object, that executes in response to a message matching the handler's name.
The first line in a handler must begin with the keyword on followed by the name of the message. The last line of the handler must begin with the keyword end.