EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 392

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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.