-- Lingo syntaxspriteObjRef.cursor // JavaScript syntaxspriteObjRef.cursor;
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.
-- Lingo syntax spriteObjRef.cursor = [castMemberObjRef, maskCastMemberObjRef] // JavaScript syntax spriteObjRef.cursor = [castMemberObjRef, maskCastMemberObjRef];
-- 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 |
|
1 |
I-Beam |
|
2 |
Cross |
|
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 |
|
258 |
Select |
|
259 |
Bucket |
|
260 |
Hand |
|
261 |
Rectangle tool |
|
262 |
Rounded rectangle tool |
|
263 |
Circle tool |
|
264 |
Line tool |
|
265 |
Rich text tool |
|
266 |
Text field tool |
|
267 |
Button tool |
|
268 |
Check box tool |
|
269 |
Radio button tool |
|
270 |
Placement tool |
|
271 |
Registration point tool |
|
272 |
Lasso |
|
280 |
Finger |
|
281 |
Dropper |
|
282 |
Wait mouse down 1 |
|
283 |
Wait mouse down 2 |
|
284 |
Vertical size |
|
285 |
Horizontal size |
|
286 |
Diagonal size |
|
290 |
Closed hand |
|
291 |
No-drop hand |
|
292 |
Copy (closed hand) |
|
293 |
Inverse arrow |
|
294 |
Rotate |
|
295 |
Skew |
|
296 |
Horizontal double arrow |
|
297 |
Vertical double arrow |
|
298 |
Southwest Northeast double arrow |
|
299 |
Northwest Southeast double arrow |
|
300 |
Smear/smooth brush |
|
301 |
Air brush |
|
302 |
Zoom in |
|
303 |
Zoom out |
|
304 |
Zoom cancel |
|
305 |
Start shape |
|
306 |
Add point |
|
307 |
Close shape |
|
308 |
Zoom camera |
|
309 |
Move camera |
|
310 |
Rotate camera |
|
457 |
Custom |
To use custom cursors, set the cursor property to a list containing the cast member to be used as a cursor or to the number that specifies a system cursor. In Windows, a cursor must be a cast member, not a resource; if a cursor is not available because it is a resource, Director displays the standard arrow cursor instead. For best results, don't use custom cursors when creating cross-platform movies.
Custom cursor cast members must be no larger than 16 by 16 pixels, and must be 1-bit in depth.
If the sprite is a bitmap that has matte ink applied, the cursor changes only when the cursor is over the matte portion of the sprite.
When the cursor is over the location of a sprite that has been removed, rollover still occurs. Avoid this problem by not performing rollovers at these locations or by relocating the sprite up above the menu bar before deleting it.
On the Macintosh, you can use a numbered cursor resource in the current open movie file as the cursor by setting cursor to the number of the cursor resource.
This statement changes the cursor that appears over sprite 20 to a watch (Macintosh) or hourglass (Windows) cursor.
-- Lingo syntax sprite(20).cursor = 4 // JavaScript syntax sprite(20).cursor = 4;