392
Chapter 12: Methods
•
marker(-1)
—
Returns the frame number of the first marker before the marker(0).
•
marker(-2)
—
Returns the frame number of the second marker before the marker(0).
If the parameter
markerNameOrNum
is a string,
marker()
returns the frame number of the first
frame whose marker label matches the string.
Parameters
markerNameOrNum
Required. A string that specifies a marker label, or an integer that specifies a
marker number.
Example
The following statement sends the playhead to the beginning of the current frame if the current
frame has a marker; otherwise, it sends the playhead to the previous marker.
-- Lingo syntax
_movie.go(_movie.marker(0))
// JavaScript syntax
_movie.go(_movie.marker(0));
This statement sets the variable
nextMarker
equal to the next marker in the Score:
-- Lingo syntax
nextMarker = _movie.marker(1)
// JavaScript syntax
nextMarker = _movie.marker(1);
See also
frame
,
frameLabel
,
go()
,
label()
,
markerList
,
Movie
max()
Usage
list.max()
max(
list
)
max(
value1
,
value2
,
value3
, ...)
Description
Function (Lingo only); returns the highest value in the specified list or the highest of a given series
of values.
The
max
function also works with ASCII characters, similar to the way
<
and
>
operators work
with strings.
Parameters
value1, value2, value3, ...
Optional. A list of values from which the highest value
is chosen.
Example
The following handler assigns the variable
Winner
the maximum value in the list
Bids
, which
consists of [#Castle:600, #Schmitz:750, #Wang:230]. The result is then inserted into the content
of the field cast member Congratulations.
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...