Mouse Wheel Scrolling Detection: различия между версиями
Материал из Поле цифровой дидактики
fix link |
Patarakin (обсуждение | вклад) м 1 версия импортирована |
(нет различий)
| |
Текущая версия от 11:33, 21 июля 2022
Шаблон:Stub This tutorial shows how to program mouse wheel scrolling detection in Scratch 1.4, 2.0 and 3.0.
Script
The when () key pressed block fires both when the up and down keys are pressed and when the mouse wheel is scrolled up or down, while the key () pressed? block only returns true if the arrow key is being pressed.
Add these scripts to the project:
when [up arrow v] key pressed if <not <key (up arrow v) pressed?>> then . . . // scrolling up end when [down arrow v] key pressed if <not <key (down arrow v) pressed?>> then . . . // scrolling down end
Example Uses
- Making a webpage in an Operating System
- Scrolling a menu in a project
