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()
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...