| The block documented in this article is a hidden block, meaning that while it technically still exists in the latest version of Scratch (3.0), it is not available in the palette. Additionally, this block no longer has any functionality. |
| Y Scroll | |
(y scroll::sensing) | |
| Category | Sensing (v154-v171), Motion (v152-v153, 3.0) |
| Type | Reporter |
| Introduced in | v152 (2.0 alpha) |
| Removed in | v172 (2.0 alpha) |
(y scroll::motion)
The Y scroll block's appearance in Scratch 3.0.
The Y Scroll block was a Sensing block and a Reporter block in the alpha version of Scratch 2.0. The block reported how far up the stage was scrolled. If it had been scrolled down, a negative number was returned. It was removed late in the alpha.
When the block was originally introduced, it was a motion block. This lasted for two version before the block was changed to a Sensing block in v154. When obsolete blocks were added in 3.0 for compatibility as hidden blocks, the block was re-introduced as a motion block rather than a Sensing block.
Example Uses
- Changing the color of the stage depending on the scrolled y position.
when gf clicked forever set [color v] effect to (y scroll::sensing) end
- Setting a message depending on the scrolled y position.
when gf clicked set [message v] to [] forever if <(y scroll::sensing) > (100)> then set [message v] to [This is the beach.] else set [message v] to [These are the hills.]