
1074
Chapter 14: Properties
To modify the elements of this list you must use the
addProp
and
deleteProp
commands
documented in the main Lingo Dictionary.
Example
This statement displays the
userData
property of the model named New Body:
put member("Car").model("New Body").userData
-- [#driver: "Bob", #damage: 34]
This statement adds the property
#health
with the value
100
to the
userData
property list for
the model named Player:
member(“scene”).model(“Player”).userData.addProp(#health,100)
userName
Usage
-- Lingo syntax
_player.userName
// JavaScript syntax
_player.userName;
Description
Player property; a string containing the user name entered when Director was installed.
Read-only.
This property is available in the authoring environment only. It could be used in a movie in a
window (MIAW) tool that is personalized to show the user’s information.
Example
The following handler places the user’s name and serial number in a display field when the
window is opened. (A movie script in the MIAW is a good location for this handler.)
-- Lingo syntax
on prepareMovie
displayString = _player.userName & RETURN & _player.organizationName \
& RETURN & _player.serialNumber
member("User Info").text = displayString
end
// JavaScript syntax
function prepareMovie() {
var displayString = _player.us "\n" + _player.organizationName
+ "\n" + _player.serialNumber;
member("User Info").text = displayString;
}
See also
Player
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...