Lesson goal: Animated-GIF: Move a small point

Previous: Introduction: Make a flashing animation | Home | Next: Make a line move

In the last lesson, you learned how to set up and create a simple flashing animated-GIF.

In this lesson, we'll use a new animation function called gif_pset() to make some small dots (pixels) move around in an animated GIF.

gif_pset(x,y,color)
Move the mouse over a dotted box for more information.

Now you try. Make a little pixel move!

Type your code here:


See your results here:

To make a clean animation, you should clear the entire frame before drawing the next one. Try experimenting with the code above by leaving in, and taking out the gif_cls(0) line. Dismiss.
Show a friend, family member, or teacher what you've done!

Here is a share link to your code:

Does your code work? Want to run it on your iPhone?

Here's your code:

  1. Use [Control]-[C] (Windows) or [⌘]-[C] (MacOS) to copy your code.

  2. Paste it using [Control]-[V] (Windows) or [⌘]-[V] (MacOS) into this page

  3. Then click the "Use on iPhone" button that you'll see.