I guess you want to know when the mouse-pointer is no longer overlapping an object.
One way would be to give the object an instance (boolean) variable
mouse is over object - set boolean to true
mouse is not over object
object boolean is true
- perform actions
- set boolean to false