User Guide
cursor() 281
Cursor commands can be interrupted by an Xtra or other external agent. If the cursor is set to a
value in Director and an Xtra or external agent takes control of the cursor, resetting the cursor to
the original value has no effect because Director doesn’t perceive that the cursor has changed. To
work around this, explicitly set the cursor to a third value and then reset it to the original value.
Parameters
intCursorNum
Required when using an integer to identify a cursor. An integer that specifies the
built-in cursor to use as a cursor.
cursorMemNum Required when using a cast member number and its optional mask to identify the
cursor. An integer that specifies the cast member number to use as a cursor.
maskMemNum Required when using a cast member number and its optional mask to identify the
cursor. An integer that specifies the mask number of
cursorMemNum.
cursorMemRef Required when using a cast member reference to identify the cursor. A reference
to the cast member to use as a cursor.
Example
This statement changes the cursor to a watch cursor on the Macintosh, and hourglass in
Windows, whenever the value in the variable named status equals 1:
-- Lingo syntax syntax
if (status = 1) then
_player.cursor(4)
end if
// JavaScript syntax
if (status == 1) {
_player.cursor(4);
}
This handler checks whether the cast member assigned to the variable is a 1-bit cast member and
then uses it as the cursor if it is:
-- Lingo syntax syntax
on myCursor(someMember)
if (member(someMember).depth = 1) then
_player.cursor(someMember)
else
_sound.beep()
end if
end
// JavaScript syntax
function myCursor(someMember) {
if (member(someMember).depth == 1) {
_player.cursor(someMember);
}
else {
_sound.beep();
}
}
See also
Player