ON CLICK keyword

Executes a SUB on a click event. A click is generated if the mouse button (or touch) lasts for less than 500 milliseconds.

Syntax

ON CLICK object, sub, limit

Parameters

  • object: object (required)
  • sub: subroutine to execute (required)
  • limit: maximum number of executions, by default unlimited

Example

ON CLICK myImage, myFunction
ON CLICK myImage, myFunction, 5

Go back to list of Keywords.