count
709
Example
This statement tells Director to display the copyright information for the Shockwave Audio file
SWAfile in a field cast member named Info Display.
-- Lingo syntax
whatState = member("SWAfile").state
if whatState > 1 AND whatState < 9 then
put(member("Info Display") = member("SWAfile").copyrightInfo)
end if
// JavaScript syntax
var whatState = member("SWAfile").state;
if (whatState > 1 && whatState < 9) {
put(member("Info Display") = member("SWAfile").copyrightInfo);
}
count
Usage
list
.count
count (
list
)
count(
theObject
)
object
.count
textExpression
.count
Description
Property (Lingo only); returns the number of entries in a linear or property list, the number of
properties in a parent script without counting the properties in an ancestor script, or the chunks
of a text expression such as characters, lines, or words.
The
count
command works with linear and property lists, objects created with parent scripts, and
the globals
property.
To see an example of
count()
used in a completed movie, see the Text movie in the Learning/
Lingo Examples folder inside the Director application folder.
Example
This statement displays the number 3, the number of entries:
put [10,20,30].count
-- 3
See also
globals
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...