This example shows how to attach to an event.