User Guide
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 sprite’s 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 movie’s window changes location.