Eng:When This Sprite Clicked (block)

The When This Sprite Clicked block is an Events block and a Hat block. Scripts that wear the block will activate once its sprite or clone of the sprite is clicked. Contrary to its definite name, the block will also execute the clone's script when the clone is clicked on.

Clicking on transparent areas of the sprite does not trigger this event, except for transparent areas surrounded by using the hollow rectangle and oval tools in the bitmap editor.

If a sprite is has been hidden by the hide block, when its location is clicked on, the script under the When This Sprite Clicked block will not activate.

In the stage, this block is called When Stage Clicked.

History
In Scratch 1.4, this block was called When Clicked. It was automatically filled in with the name of the sprite it was placed on.

In Scratch 2.0, its name was changed to When This Sprite Clicked, likely to make the block name consistent for all sprites. In early versions, it was called When I Am Clicked, but this was changed for unknown reasons.

Example Uses
when this sprite clicked broadcast [open menu v] //an example button that opens a menu when this sprite clicked switch backdrop to [meadow v] //changing backdrops when this sprite clicked repeat (20) change [whirl v] effect by (5) end repeat (10) change size by (-10) when this sprite clicked say [Hello!] for (2) secs ask [How are you feeling today?] and wait if <(answer) = [Happy]> then say [That's good!] for (2) secs when this sprite clicked set size to (90)% wait (0.5) secs set size to (100)% broadcast [Menu v]
 * Making buttons
 * Operating Systems
 * Interacting with objects
 * Input controls
 * Menus

Workaround
This block can be replicated with the following code:

when gf clicked forever wait until > wait until  if  then . . . end or when gf clicked forever if  then if  then . . . end wait until > end