User Guide
getProp() 343
getPref()
Usage
getPref(prefFileName)
Description
Function; retrieves the content of the specified file.
When you use this function, replace
prefFileName with the name of a file created by the
setPref function. If no such file exists, getPref returns VOID.
The filename used for
prefFileName must be a valid filename only, not a full path; Director
supplies the path. The path to the file is handled by Director. The only valid file extensions for
prefFileName are .txt and .htm; any other extension is rejected.
Do not use this command to access read-only or locked media.
Note: In a browser, data written by setPref is not private. Any movie with Shockwave content can
read this information and upload it to a server. Confidential information should not be stored using
setPref.
To see an example of getPref() used in a completed movie, see the Read and Write Text movie
in the Learning/Lingo folder inside the Director application folder.
Parameters
prefFileName
Required. Specifies the file from which content is retrieved.
Example
This handler retrieves the content of the file Test and then assigns the file’s text to the field
Total Score:
on mouseUp
theText = getPref("Test")
member("Total Score").text = theText
end
See also
setPref()
getProp()
Usage
getProp(list, property)
list.property
Description
Property list function; identifies the value associated with a property in a property list.
Almost identical to the
getaProp command, the getProp command displays an error message if
the specified property is not in the list or if you specify a linear list.
Parameters
list
Required. Specifies the property list from which property is retrieved.
property Required. Specifies the property with which the identified value is associated.