For example, this handler creates a property list named Description that contains the definitions
for
and
movement
on getPropertyDescriptionList
set description = [:]
addProp description, #Movement, [#default: 5, #format:#integer, #comment: ¬
"Set motion to the right:", #range: [#min:1, #max:10]]
addProp description, #noise, [#default:"", format: #sound, ¬
#comment:"Sound cast member name"]
return description
end
Alternatively, you can use this syntax to do the same as the previous handler:
on getPropertyDescriptionList
return [¬
#Movement: [#default: 5, #format:#integer, #comment: ¬
"Set motion to the right:", #range: [#min:1, #max:10]],
#noise: [#default:"", format: #sound, ¬
#comment:"Sound cast member name"]
]
end
Including a description for the Behavior inspector
An
on getBehaviorDescription
appears in the bottom pane of the Behavior inspector when the behavior is selected. For
example, this handler displays the phrase "This changes sprite color and position" in the
Behavior inspector:
on getBehaviorDescription
return "This changes sprite color and position"
end
368
Chapter 14
:
whichSound
handler in a behavior's script provides a description that
Need help?
Do you have a question about the DIRECTOR MX-USING DIRECTOR MX and is the answer not in the manual?