onMouseClick()
Register a function to call when the mouse is clicked (pressed down and released) on this object.
Parameters
Once an object item has been created, you can use the following function:
item.onMouseClick(action)
| Parameter | Type | Default | Description |
|---|---|---|---|
action |
function |
required | The function to call; it receives two parameters, x and y, giving the mouse position in display coordinates. |