Lingo Dictionary > L-N > on mouseWithin

 

on mouseWithin

Syntax

on mouseWithin
	statement(s)
end

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 is over a sprite:

on mouseWithin
	member("Display").text = string(the mouseH)
end mouseWithin

See also

on mouseEnter, on mouseLeave