number (Member)
895
number (lines)
Usage
the number of lines in
chunkExpression
Description
Chunk expression; returns a count of the lines in a chunk expression. (Lines refers to lines
delimited by carriage returns, not lines formed by line wrapping.)
Chunk expressions are any character, word, item, or line in any container of characters.
Containers include field cast members and variables that hold strings, and specified characters,
words, items, lines, and ranges in containers.
Note:
The
count()
function provides a more efficient alternative for determining the number of lines
in a chunk expression.
Example
This statement displays the number of lines in the string “Macromedia, the Multimedia
Company” in the Message window:
put the number of lines in "Macromedia, the Multimedia Company"
The result is 1.
This statement sets the variable
lineCounter
to the number of lines in the field Names:
lineCounter = the number of lines in member("Names").text
You can accomplish the same thing with text cast members with the syntax:
lineCounter = member("Names").line.count
See also
line...of
,
count()
,
number (characters)
,
number (items)
,
number (words)
number (Member)
Usage
-- Lingo syntax
memberObjRef
.number
// JavaScript syntax
memberObjRef
.number;
Description
Member property; indicates the cast library number of a specified cast member. Read-only.
The value of this property is a unique identifier for the cast member that is a single integer
describing its location in and position in the cast library.
Example
This statement assigns the cast number of the cast member Power Switch to the variable
whichCastMember
:
-- Lingo syntax
whichCastMember = member("Power Switch").number
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...