Working with the Mouse

Mouse

Working with the Mouse

This code sets the turtle's position to that of the mouse and enables drawing when the left button is held down. The function needs all 5 sets of [] brackets. Try to work out what they do!

pu mouseon [setpos mousepos pd] [pu][][][setpos mousepos]

This turns it off!

mouseoff

Last updated 23rd February 2010