User Guide

595
This command does not perform any sophisticated manipulation of the string data or its
formatting. You must perform any formatting or other manipulation in conjunction with
getPref(); you can manipulate the data in memory and write it over the old file using setPref.
In a browser, data written by
setPref is not private; any Shockwave movie can read this
information and upload it to a server. Do not store confidential information using setPref.
On Windows, the
setPref command fails if the user is a restricted user.
To see an example of
setPref used in a completed movie, see the Read and Write Text movie in
the Learning/Lingo Examples folder inside the Director application folder.
Example
This handler saves the contents of the field cast member Text Entry in a file named DayWare
settings:
on mouseUp me
setPref "CurPrefs", member("Text Entry").text
end
See also
getPref()
setProp
Syntax
setProp list, property, newValue
list.listProperty = newValue
list[listProperty] = newValue
Description
Command; replaces the value assigned to property with the value specified by newValue in the list
specified by list. If the list doesnt contain the specified property, setProp returns a script error.
The
setProp command works with property lists only. Using setProp with a linear list produces a
script error.
This command is similar to the
setaProp command, except that setProp returns an error when the
property is not already in the list.
Examples
This statement changes the value assigned to the age property of property list x to 11:
setProp x, #age, 11
Using the dot operator, you can alter the property value of a property already in a list, exactly as
above:
x.age = 11
See also
setaProp