User Guide

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.userName + "\n" + _player.organizationName
+ "\n" + _player.serialNumber;
member("User Info").text = displayString;
}
See also
Player