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.
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...