|When () Clicked|
The When () Clicked block is a Control Block and a Hat Block. This block allows the user to make a script which will only activate when the selected sprite is clicked. The block will run the script every time the sprite is clicked instead of the first time.
Some common uses for this block are:
- Buttons/Options for menus
- Scratch OSs
- Tutorials (clicking a button to move on)
Below are two scripting examples:
This script will ask for input from a user when the sprite has been clicked.
The sprite that holds this script will shrink and grow (imitating a button), before making a broadcast.