User Guide

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 cursors hot spot is still the registration point of the cast member.