278
Chapter 12: Methods
pos1 = vector(100, 0, 0)
pos2 = vector(0, 100, 0)
put pos1.cross(pos2)
-- vector( 0.0000, 0.0000, 1.00000e4 )
See also
crossProduct()
,
perpendicularTo
crossProduct()
Usage
vector1
.crossProduct(
vector2
)
Description
3D vector method; returns a vector which is perpendicular to both
vector1
and
vector2
.
Example
In this example,
pos1
is a vector on the x axis and
pos2
is a vector on the y axis. The value
returned by
pos1.crossProduct(pos2)
is
vector( 0.0000, 0.0000, 1.00000e4 )
, which is
perpendicular to both pos1 and pos2.
pos1 = vector(100, 0, 0)
pos2 = vector(0, 100, 0)
put pos1.crossProduct(pos2)
-- vector( 0.0000, 0.0000, 1.00000e4 )
See also
perpendicularTo
,
cross
cursor()
Usage
-- Lingo syntax
_player.cursor(
intCursorNum
)
_player.cursor(
cursorMemNum
,
maskMemNum
)
_player.cursor(
cursorMemRef
)
// JavaScript syntax
_player.cursor(
intCursorNum
);
_player.cursor(
cursorMemNum
,
maskMemNum
);
_player.cursor(
cursorMemRef
);
Description
Player method; changes the cast member or built-in cursor that is used for a cursor and stays in
effect until you turn it off by setting the cursor to 0.
•
Use the syntax
_player.cursor(
cursorMemNum
,
maskMemNum
)
to specify the number of a
cast member to use as a cursor and its optional mask. The cursor’s hot spot is the registration
point of the cast member.
The cast member that you specify must be a 1-bit cast member. If the cast member is larger
than 16 by 16 pixels, Director crops it to a 16-by-16-pixel square, starting in the upper left
corner of the image. The cursor’s hot spot is still the registration point of the cast member.
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...