EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 895

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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