Writing Scripts with Lingo
407
•
The word
next
or
previous
refers to the next marker or the marker before the current scene,
respectively.
•
The term
the frame
followed by a minus or plus sign and the number of frames before
or after the current frame refers to a frame that’s a specific number of frames before or after
the current frame. For example,
the frame - 20
refers to the frame 20 frames before the
current frame.
•
The term
the frameLabel
identifies the label assigned to the current frame.
•
The
labelList
system property contains a list of all of the markers in the Score. Each marker
is separated in the list by a carriage return.
•
The function
marker()
, with a positive or negative number of markers used as the parameter,
refers to the marker that’s a specific number of markers before or after the current frame. For
example,
marker(-1)
returns the frame number of the previous marker and
marker(2)
returns the frame number of the second marker after the current frame. If the frame is marked,
marker(0)
returns the frame number of the current frame; if not,
marker(0)
gives the frame
number of the previous marker.
•
The term
movie
followed by the movie name refers to the beginning of another movie. For
example,
movie "Navigation"
refers to the beginning of the movie called Navigation.
•
The word
frame
plus a frame identifier, the word
of
, the word
movie
, and the movie name
refers to a specific frame in another movie; for example,
frame 15 of movie "Navigation"
refers to frame 15 of the movie called Navigation.
Using symbols
A symbol is a string or other value that begins with the pound (
#
) sign.
Symbols are user-defined constants. Comparisons using symbols can usually be performed very
quickly, providing more efficient code.
For example, the statement
userLevel = #novice
runs more quickly than the statement
userLevel = "novice"
Symbols can’t contain spaces or punctuation.
Convert a string to a symbol by using the
symbol()
function. Convert a symbol back to a string
by using the
string()
function.
x = symbol("novice")
put x
-- #novice
x = string(#novice)
put x
-- "novice"
See
# (symbol)
and
string()
in the Lingo Dictionary.
Содержание Director MX
Страница 1: ...Using Director MX Macromedia Director MX ...
Страница 12: ...Contents 12 ...
Страница 156: ...Chapter 4 156 ...
Страница 202: ...Chapter 6 202 ...
Страница 244: ...Chapter 7 244 ...
Страница 292: ...Chapter 10 292 ...
Страница 330: ...Chapter 12 330 ...
Страница 356: ...Chapter 13 356 ...
Страница 372: ...Chapter 14 372 ...
Страница 442: ...Chapter 16 442 ...
Страница 472: ...Chapter 18 472 ...
Страница 520: ...Chapter 19 520 ...
Страница 536: ...Chapter 20 536 ...
Страница 562: ...Chapter 23 562 ...
Страница 566: ...Chapter 24 566 ...
Страница 602: ...Chapter 27 602 ...