MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 894

Director scripting reference
Table of Contents

Advertisement

Example
This statement displays the number of characters in the string "Macromedia, the Multimedia
Company" in the Message window:
put the number of chars in "Macromedia, the Multimedia Company"
The result is 34.
This statement sets the variable
the string Names:
charCounter = the number of chars in member("Names").word[i]
You can accomplish the same thing with text cast members using the syntax:
charCounter = member("Names").word[i].char.count
See also
length(), char...of, count(),
number (items)
Usage
the number of items in chunkExpression
Description
Chunk expression; returns a count of the items in a chunk expression. An item chunk is any
sequence of characters delimited by commas.
Chunk expressions are any character, word, item, or line in any container of characters.
Containers include fields (field cast members) and variables that hold strings, and specified
characters, words, items, lines, and ranges in containers.
Note: The
count()
in a chunk expression.
Example
This statement displays the number of items in the string "Macromedia, the Multimedia
Company" in the Message window:
put the number of items in "Macromedia, the Multimedia Company"
The result is 2.
This statement sets the variable
itemCounter = the number of items in member("Names").text
You can accomplish the same thing with text cast members using the syntax:
itemCounter = member("Names").item.count
See also
item...of, count(),
894
Chapter 14: Properties
charCounter
number
function provides a more efficient alternative for determining the number of items
itemCounter
number
(characters),
to the number of characters in the word i located in
(items),
number
(lines),
to the number of items in the field Names:
number
(lines),
number (words)
number (words)

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