User Guide

720 Chapter 14: Properties
cursor
Usage
-- Lingo syntax
spriteObjRef.cursor
// JavaScript syntax
spriteObjRef.cursor;
Description
Sprite property; determines the cursor used when the pointer is over a sprite. Read/write.
This property stays in effect until you turn it off by setting the cursor to 0. Use the
cursor
property to change the cursor when the mouse pointer is over specific regions of the screen and to
indicate regions where certain actions are possible when the user clicks on them.
When you set the
cursor property in a given frame, Director keeps track of the sprite rectangle to
determine whether to alter the cursor. This rectangle persists when the movie enters another
frame unless you set the
cursor property for that channel to 0.
Use the following syntax to specify the number of a cast member to use as a cursor and its
optional mask.
-- Lingo syntax
spriteObjRef.cursor = [castMemberObjRef, maskCastMemberObjRef]
// JavaScript syntax
spriteObjRef.cursor = [castMemberObjRef, maskCastMemberObjRef];
Use the following syntax to specify default system cursors.
-- Lingo syntax
spriteObjRef.cursor = castMemberObjRef
// JavaScript syntax
spriteObjRef.cursor = castMemberObjRef;
The cursor property can be set to one of the following integer values:
Value Description
-1, 0 Arrow
1I-Beam
2Cross
3 Crossbar
4 Watch (Macintosh) or Hour glass (Windows)
5 North South East West (NSEW)
6 North South (NS)
200 Blank (hides cursor)
254 Help
256 Pencil
257 Eraser