In the manual: Event
If you have a function that you want to assign to a model use this example:
Code:
my.event = bounce_event;


as it stated in the manual.