Lingo Dictionary > O-R > on

 

on

Syntax

on handlerName {argument1}, {arg2}, {arg3} ...
	statement(s)
end handlerName

Description

Keyword; indicates the beginning of a handler, a collection of Lingo statements that you can execute using the handler name. A handler can accept arguments as input values and returns a value as a function result.

Handlers can be defined in behaviors, movie scripts, and cast member scripts. A handler in a cast member script can be called only by other handlers in the same script. A handler in a movie script can be called from anywhere.

You can use the same handler in more than one movie by putting the handler's script in a shared cast.