Chapter 14
368
For example, this handler creates a property list named Description that contains the definitions
for
movement
and
whichSound
:
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
handler in a behavior’s script provides a description that
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
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...