Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.
X Scroll
x scroll:: sensing reporter
Category Sensing
Type Reporter
Introduced in v152 (2.0 alpha)
Removed in v172 (2.0 alpha)

The X Scroll block was a Sensing block and a Reporter block. The block reported how far right the stage was scrolled. If it had been scrolled left, a negative number is returned. It was removed late in the alpha.

Example Uses

  • Showing a message when a player is scrolled to a certain x position.
when gf clicked
show variable [message v]
forever
if <(x scroll::sensing) > (99)> then
set [message v] to [This is the forest.]
else
set [message v] to [This is the farm.]
end
  • Playing an animation when a player is scrolled to a certain x position.
when gf clicked
forever
if <(x scroll::sensing) < (50)> then
broadcast [swim animation v]
else
broadcast [walk animation v]
end
end

See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.