382
Chapter 12: Methods
Example
This example shows the two ways of referring to a light. The first line uses a string in parentheses
and the second line uses the a number in brackets. The string is the light’s name and the number
is the position of the light in the cast member’s list of lights.
thisLight = member("3D World").light("spot01")
thisLight = member("3D World").light[2]
See also
newLight
,
deleteLight
lineHeight()
Usage
-- Lingo syntax
memberObjRef
.lineHeight(
lineNumber
)
// JavaScript syntax
memberObjRef
.lineHeight(
lineNumber
);
Description
Function; returns the height, in pixels, of a specific line in a specified field cast member.
Parameters
lineNumber
Required. An integer that specifies the line to measure.
Example
This statement determines the height, in pixels, of the first line in the field cast member Today’s
News and assigns the result to the variable
headline
:
--Lingo syntax
headline = member("Today's News").lineHeight(1)
// JavaScript syntax
var headline = member("Today's News").lineHeight(1);
linePosToLocV()
Usage
-- Lingo syntax
memberObjRef
.linePosToLocV(
lineNumber
)
// JavaScript syntax
memberObjRef
.linePosToLocV(
lineNumber
);
Description
Function; returns a specific line’s distance, in pixels, from the top edge of the field cast member.
Parameters
lineNumber
Required. An integer that specifies the line to measure.
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...