put...into
219
put...before
Usage
-- Lingo syntax
put
expression
before
chunkExpression
Description
Command; evaluates a Lingo expression, converts the value to a string, and inserts the resulting
string before a specified chunk in a container, without replacing the container’s contents. (If
chunkExpression
specifies a nonexistent target chunk, the string value is inserted as appropriate
into the container.)
Chunk expressions refer to any character, word, item, or line in any container. Containers include
field cast members; text cast members; variables that hold strings; and specified characters, words,
items, lines, and ranges in containers.
Example
This statement sets the variable
animalList
to the string “fox dog cat” and then inserts the word
elk
before the second word of the list:
put "fox dog cat" into animalList
put "elk " before word 2 of animalList
The result is the string “fox elk dog cat”.
The same can be accomplished using this syntax:
put "fox dog cat" into animalList
put "elk " before animalList.word[2]
See also
char...of
,
item...of
,
line...of
,
paragraph
,
word...of
,
put...after
,
put...into
put...into
Usage
-- Lingo syntax
put
expression
into
chunkExpression
Description
Command; evaluates a Lingo expression, converts the value to a string, and uses the resulting
string to replace a specified chunk in a container. (If
chunkExpression
specifies a nonexistent
target chunk, the string value is inserted as appropriate into the container.)
Chunk expressions refer to any character, word, item, or line in any container. Containers include
field cast members; text cast members; variables that hold strings; and specified characters, words,
items, lines, and ranges in containers.
When a movie plays back as an applet, the
put...into
command replaces all text within a
container, not chunks of text.
To assign values to variables, use the
set
command.
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...