Novelty scripting reference > Scripted events > OnMouseLeave


This event is triggered when the mouse cursor leaves the bounding rectangle of an object.


The mouse coordinates given are relative to the center of the scene. To make them relative to an object or the top left corner of scene use TransformToObjectCoord or TransformToSceneCoord respectively.

Implicit arguments

Object@ sender
Handle to an associated object; or null.

float mouseX
Horizontal cursor position.

float mouseY
Vertical cursor position.


event Sample.OnMouseLeave
	// Get relative point where cursor left the object   
	Vector2 Point = TransformToObjectCoord(sender, mouseX, mouseY);

Back to top