When a message is sent to an object, that message will continue up the message path looking for a handler to execute. If that handler contains a reference to the Target, it refers to the original object that received the message.
Built-in Function handler[]
The general syntax:
target() the target
For Example:
on mouseDown if word 1 of the target is "button" then set the name of the target to "Blue Boy" end mouseDown
Suppose the above mouseDown handler is in the card script. When the user clicks on a card button, the mouseDown message is sent to that button. If the button does not contain a mouseDown handler, the message passes on to the card, which does have the above mouseDown handler. That handler will be executed. It contains a reference to the Target. In other words, the button which originally received the mouseDown message. That button will then be named "Blue Boy".
See also: dragDestination (function),selectedObject (function),mouseDown (message),card (object),button (object),script (property),name (property),text (property),