on getPropertyDescriptionList
175
Description
System message and event handler; contains Lingo that generates a list of definitions and labels
for the parameters that appear in a behavior’s Parameters dialog box.
Place the
on getPropertyDescriptionList
handler within a behavior script. Behaviors that
don’t contain an
on getPropertyDescriptionList
handler don’t appear in the Parameters
dialog box and can’t be edited from the Director interface.
The
on getPropertyDescriptionList
message is sent when any action that causes the
Behavior Inspector to open occurs: either when the user drags a behavior to the Score or the user
double-clicks a behavior in the Behavior inspector.
The
#default
,
#format
, and
#comment
settings are mandatory for each parameter. The
following are possible values for these settings:
Example
The following handler defines a behavior’s parameters that appear in the Parameters dialog box.
Each statement that begins with
addProp
adds a parameter to the list named description. Each
element added to the list defines a property and the property’s
#default
,
#format
, and
#comment
values:
on getPropertyDescriptionList
description = [:]
description.addProp(#dynamic, [#default:1, #format:#boolean, \
#comment:"Dynamic"])
description.addProp(#fieldNum, [#default:1, #format:#integer, \
#comment:"Scroll which sprite:"])
description.addProp(#extentSprite, [#default:1,#format:#integer, \
#comment: "Extend Sprite:"])
description.addProp(#proportional, [#default:1,#format:#boolean, \
#comment: "Proportional:"])
return description
end
See also
addProp
,
on getBehaviorDescription
,
on runPropertyDialog
#default
The parameter’s initial setting.
#format
#integer #float #string #symbol #member #bitmap #filmloop #field #palette
#picture #sound #button #shape #movie #digitalvideo #script #richtext
#ole #transition #xtra #frame #marker #ink #boolean
#comment
A descriptive string that appears to the left of the parameter’s editable field in the
Parameters dialog box.
#range
A range of possible values that can be assigned to a property. The range is
specified as a linear list with several values or as a minimum and maximum in the
form of a property list:
[#min: minValue, #max: maxValue]
.
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...