![MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference Download Page 281](http://html1.mh-extra.com/html/macromedia/director-mx-2004-director-scripting/director-mx-2004-director-scripting_reference_3321720281.webp)
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
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...