MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 187

Director scripting reference
Table of Contents

Advertisement

on mouseWithin
Usage
-- Lingo syntax
on mouseWithin
statement(s)
end
// JavaScript syntax
function mouseWithin() {
statement(s);
}
Description
System message and event handler; contains statements that run when the mouse is within the
active area of the sprite. The mouse button does not have to be pressed.
If the sprite is a bitmap cast member with the matte ink applied, the active area is the portion of
the image that is displayed; otherwise, the sprite's bounding rectangle is the active area.
If used in a behavior, this event is passed the sprite script or frame script reference
Example
This statement displays the mouse location when the mouse pointer is over a sprite:
-- Lingo syntax
on mouseWithin
member("Display").text = string(_mouse.mouseH)
end
// JavaScript syntax
function mouseWithin() {
member("Display").text = _mouse.mouseH.toString();
}
See also
on
mouseEnter,
on moveWindow
Usage
-- Lingo syntax
on moveWindow
statement(s)
end
// JavaScript syntax
function moveWindow() {
statement(s);
}
Description
System message and event handler; contains statements that run when a window is moved, such
as by dragging a movie to a new location on the Stage, and is a good place to put Lingo that you
want executed every time a movie's window changes location.
on mouseLeave
.
me
on moveWindow
187

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents