212
Chapter 11: Keywords
Chunk expressions refer to any character, word, item, or line in any source of characters. Sources
of characters include field cast members and variables that hold strings.
Example
This statement assigns the first four lines of the variable
Action
to the field cast member To Do:
member("To Do").text = Action.line[1..4]
This statement inserts the word
and
after the second word of the third line of the string assigned
to the variable
Notes
:
put "and" after Notes.line[3].word[2]
See also
char...of
,
item...of
,
word...of
,
number of members
loop (keyword)
Usage
-- Lingo syntax
_movie.goLoop()
Description
Keyword; refers to the marker.
Example
This handler loops the movie between the previous marker and the current frame:
on exitFrame
_movie.goLoop()
end exitFrame
me
Usage
-- Lingo syntax
me
Description
Special variable; used within parent scripts and behaviors to refer to the current object that is an
instance of the parent script or the behavior or a variable that contains the memory address of
the object.
The term has no predefined meaning in Lingo. The term
me
is used by convention.
To see an example of
me
used in a completed movie, see the Parent Scripts movie in the Learning/
Lingo Examples folder inside the Director application folder.
Example
The following statement sets the object
myBird1
to the script named Bird. The
me
keyword
accepts the parameter script Bird and is used to return that parameter.
myBird1 = new script("Bird")
This is the
on new
handler of the Bird script:
Summary of Contents for DIRECTOR MX 2004
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...