Navigation and User Interaction
377
Detecting mouse clicks with Lingo
Users can click the mouse button in several ways, each of which Lingo can detect. The following
are ways that you can use Lingo to detect what the user does with the mouse. See individual
properties and functions in the Lingo Dictionary.
•
To determine the last place the mouse was clicked, use the
clickLoc()
function.
•
To determine the last active sprite (a sprite with a script attached) that the user clicked, use the
clickOn
function.
•
To determine whether the last two clicks were a double-click, use the
doubleClick
function.
•
To determine the time since the mouse was last clicked, use the
lastClick()
function.
•
To determine whether the mouse button is pressed, check the
mouseDown
property.
•
To determine whether the mouse button is released, check the
mouseUp
property.
•
To determine whether the user presses the right mouse button (Windows) or click
(Macintosh), check the
rightMouseDown
property.
•
To determine whether the user releases the right mouse button (Windows) or click
(Macintosh), check the
rightMouseUp
property.
For example, this handler checks whether the user double-clicked the mouse button and, if so,
runs the
openWindow
handler:
on mouseDown
if the doubleClick = TRUE then openWindow
end
Making sprites editable and draggable
Using the Property inspector, you can make a sprite editable, draggable, or both while your movie
is running. See “Displaying and editing sprite properties in the Property inspector” on page 162.
To make a sprite draggable on the Stage:
•
Click the Moveable button in the Property inspector.
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...