Scratch for Java

Sprite::whenMouseClicked()

This method is called when a mouse click event occurs. Override this method to define custom behavior.

Examples

View on GitHub

Syntax

Java

.whenMouseClicked(mouseCode)

Parameters

Name Data Type Description
mouseCode MouseCode The code representing the mouse button that was clicked.

Return

void

whenMouseClicked()

Create Shareable URL

Select Sections