MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 342

Director scripting reference
Table of Contents

Advertisement

To see an example of
in the Learning/Lingo folder inside the Director application folder.
Parameters
stringPrefName
Example
This handler retrieves the content of the file Test and then assigns the file's text to the field
Total Score:
-- Lingo syntax
on mouseUp
theText = _player.getPref("Test")
member("Total Score").text = theText
end
// JavaScript syntax
function mouseUp() {
var theText = _player.getPref("Test");
member("Total Score").text = theText;
}
See also
Player,
setPref()
getPos()
Usage
list.getPos(value)
getPos(list, value)
Description
List function; identifies the position of a value in a list. When the specified value is not in the list,
the
command returns the value 0.
getPos
For values contained in the list more than once, only the first occurrence is displayed. This
command performs the same function as the
Parameters
Required. Specifies the value associated with the position.
value
Example
This statement identifies the position of the value 12 in the list Answers, which consists of [#a:10,
#b:12, #c:15, #d:22]:
put Answers.getPos(12)
The result is 2, because 12 is the second value in the list.
See also
getOne()
342
Chapter 12: Methods
used in a completed movie, see the Read and Write Text movie
getPref()
Required. A string that specifies the file for which content is retrieved.
command when used for linear lists.
getOne

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Director mx 2004

Table of Contents