(Redirected from Clear (block))
Erase All | |
erase all | |
Category | Pen |
Type | Stack |
Introduced in | 0.3 |
The erase all block is a stack block and a pen block. The block removes all marks made by the pen or stamping. It is the only pen block that the stage can use.
Prior to Scratch 3.0, this block was called Clear, or clear
.
Example Uses
This block is used in most projects involving the pen, as clearing the screen once the project starts would be a main priority.
Some common uses for the Erase All block are:
- Clearing the screen in a paint program:
when this sprite clicked switch costume to (pressed v) erase all wait until < not < mouse down? > > switch costume to (not pressed v)
- Resetting the penning ground in a pattern maker:
wait until <(dots made) > [50]> set [dots made v] to [0] erase all
- Removing stamps in a maze generator or something similar:
when I receive [next maze v] erase all broadcast (generate v)
- Clearing the screen to draw the next frame in a pen animation
when green flag clicked forever draw end define draw erase all . . .