hide
Category:Turtle
Sometimes seeing the turtle icon is helpful when it is drawing something, other times you might want to hide the turtle so it does not obscure the picture.
Examples
Basic Example
// Hide the turtle and move it up from the turtle starting postion at the center of the screen.
hide();
moveForward();
Example: Peek-a-Boo
Use buttons to hide and show the turtle.
// Use buttons to hide and show the turtle.
button("hide-turtle", "hide");
button("show-turtle", "show");
onEvent("hide-turtle", "click", function() {
hide();
});
onEvent("show-turtle", "click", function() {
show();
});

Syntax
hide();
Returns
No return value. Alters the display only.
Tips
- show() is often used with hide.
- The turtle's ability to draw is not effected by the show() or hide() commands, which only control if the turtle icon is displayed or not.
Found a bug in the documentation? Let us know at support@code.org.