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
Note Tip: To make it seem as if the mouse was drawing and not a sprite, try setting the sprite's ghost effect to 100 or hiding the Sprite (The sprite can be blank, so one does not have to do these things).

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 Note: This method does not work in the editor when one is viewing scripts.

See Also