tap()

Tap is a built-in function in Bitsbox. The code you put inside the drag function only runs when someone taps their finger (or cursor) on the screen.

Before the function is called, the global variables x and y are set to the current location of the user's finger.

This program draws a stamp wherever you tap your finger. Note the use of the x and y variables.