Drawing with the Mouse

Материал из Поле цифровой дидактики
Версия от 11:33, 21 июля 2022; Patarakin (обсуждение | вклад) (1 версия импортирована)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)

This tutorial explains how to use the pen blocks to draw with the mouse through a sprite. The following method, using a sprite that follows the mouse, creates the effect that the mouse is making the drawing. Adding different colors can create different effects.

Method 1

Here is the first script that allows one to draw:

when flag clicked
pen up
erase all
forever
go to (mouse-pointer v)
if <mouse down?> then
pen down
else
pen up
end
end

Шаблон:Tip

Method 2

Here is the second method that allows one to draw:

when flag clicked
erase all // assuming the green flag is the clear button
forever
go to (mouse-pointer v)

when this sprite clicked
stamp

Шаблон:Note

See Also

de:Mit dem Mauszeiger malen id:Menggambar dengan Mouse ja:マウスで描く