EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 355

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
handlers() 355
handler()
Usage
scriptObject.handler(#handlerSymbol)
Description
This function returns TRUE if the given scriptObject contains a specified handler, and FALSE if
it does not. The script object must be a parent script, a child object, or a behavior.
Parameters
symHandler
Required. Specifies the name of the handler.
Example
This Lingo code invokes a handler on an object only if that handler exists:
if spiderObject.handler(#pounce) = TRUE then
spiderObject.pounce()
end if
See also
handlers(), new(), rawNew(), script()
handlers()
Usage
scriptObject.handlers()
Description
This function returns a linear list of the handlers in the given scriptObject. Each handler name
is presented as a symbol in the list. This function is useful for debugging movies.
You cannot get the handlers of a script cast member directly. You have to get them via the
script
property of the member.
Parameters
None.
Example
This statement displays the list of handlers in the child object RedCar in the Message window:
put RedCar.handlers()
-- [#accelerate, #turn, #stop]
This statement displays the list of handlers in the parent script member CarParentScript in the
Message window:
put member(“CarParentScript”).script.handlers()
-- [#accelerate, #turn, #stop]
See also
handler(), script()