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
Содержание DIRECTOR MX-USING DIRECTOR MX
Страница 1: ...Using Director MX Macromedia Director MX...
Страница 12: ...Contents 12...
Страница 156: ...Chapter 4 156...
Страница 202: ...Chapter 6 202...
Страница 244: ...Chapter 7 244...
Страница 292: ...Chapter 10 292...
Страница 330: ...Chapter 12 330...
Страница 356: ...Chapter 13 356...
Страница 372: ...Chapter 14 372...
Страница 442: ...Chapter 16 442...
Страница 472: ...Chapter 18 472...
Страница 520: ...Chapter 19 520...
Страница 536: ...Chapter 20 536...
Страница 562: ...Chapter 23 562...
Страница 566: ...Chapter 24 566...
Страница 602: ...Chapter 27 602...