Lesson 14, Unit 3


#1

Student wants the Click Me to be on the screen until the mouse moves. I have included her code. I don’t know how to tell her to write the code in order for the Click me to disappear once the mouse moves on the screen.


#2

Hi Nicole,
It sounds like the student’s current problem is finding a way to make text disappear (for good) once the user moves the mouse. You can do this by using a boolean (true/false) variable that just keeps track of whether the mouse has moved yet. If it hasn’t, draw the text. Here’s an example:


You could take it further by adding an else clause to the second conditional statement in my code. This would provide a place to add more instructions about what to draw after that initial movement has occurred.
I hope this helps!
Best,
Mike