EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 187

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
on moveWindow 187
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 sprites bounding rectangle is the active area.
If used in a behavior, this event is passed the sprite script or frame script reference
me.
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 mouseLeave
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 movies window changes location.

Related product manuals