Detecting Mouse Clicks With Lingo Or Javascript Syntax - MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Use Manual

Hide thumbs Also See for DIRECTOR MX 2004-USING DIRECTOR:
Table of Contents

Advertisement

Jumping away and returning to the original location
You might want a movie to jump to a different frame or a separate movie and then return to the
original frame. For example, at a website that describes the weather, you could jump to a movie
segment that explains a weather term and then return to the original location.
To jump away and return to the original location:
Use the
play
The
method branches a movie to another frame, another movie, or a specified frame in
play
another movie. The
without requiring that you specify where to return.
Use the
and
play
When the movie you want to play does not have instructions about where to return.
When you want to play several movies sequentially from a single script. When one movie
finishes, the movie returns to the script that issued the
When you want to put one sequence inside another sequence and easily return to where you
were in the outer sequence.
When you want to jump to one loop from several different locations.
For more information about these methods, see the Scripting Reference topics in the Director
Help Panel.

Detecting mouse clicks with Lingo or JavaScript syntax

Users can click the mouse button in several ways, each of which can be detected by script. The
following are ways that you can use Lingo or JavaScript syntax to detect what the user does with
the mouse. For more information, see the Scripting Reference topics in the Director Help Panel.
To determine the last place the mouse was clicked, use the
To determine the last active sprite (a sprite with a script attached) that the user clicked, use the
method.
clickOn
To determine whether the last two clicks were a double-click, use the
To determine the time since the mouse was last clicked, use the
To determine whether the mouse button is pressed, check the
To determine whether the mouse button is released, check the
To determine whether the user presses the right mouse button (Windows) or Control-click
(Macintosh), check the
To determine whether the user releases the right mouse button (Windows) or Control-click
(Macintosh), check the
For example, this handler checks whether the user double-clicked the mouse button and, if so,
runs the
openWindow
on mouseDown
if the doubleClick = TRUE then openWindow
end
294
Chapter 13: Navigation and User Interaction
and
methods.
play done
method remembers the original frame and returns to it
play done
methods in the following situations:
play done
rightMouseDown
rightMouseUp
handler:
method.
play
clickLoc()
property.
property.
method.
method.
doubleClick
method.
lastClick()
property.
mouseDown
property.
mouseUp

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-USING DIRECTOR and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Director mx 2004

Table of Contents