Lingo Dictionary > L-N > mouseOverButton

 

mouseOverButton

Syntax

sprite whichFlashSprite.mouseOverButton
the mouseOverButton of sprite whichFlashSprite

Description

Flash sprite property; indicates whether the mouse pointer is over a button in a Flash movie sprite specified by the whichFlashSprite parameter (TRUE), or whether the mouse pointer is outside the bounds of the sprite or the mouse pointer is within the bounds of the sprite but over a nonbutton object, such as the background (FALSE).

This property can be tested but not set.

Example

This frame script checks to see if the mouse pointer is over a navigation button in the Flash movie in sprite 3. If the mouse pointer is over the button, the script updates a text field with an appropriate message; otherwise, the script clears the message.

on enterFrame
	case sprite(3).mouseOverButton of
		TRUE:
			member("Message Line").text = "Click here to go to the next page."
		FALSE:
			member("Message Line").text = " "
	end case
	updatestage
end