Learn Create Your Own Split Screen

Next Page

The approach of using a timer works pretty well, and corresponds exactly to the way we'd do it in Scratch.

But we can do better than that.

We can make MySprite animate itself.  


 

Why would we want to do that?

Imagine a program with lots of different objects, all animated in different ways. Imagine you want to be able to stop and start each animation. Doing so via separate timers would quickly become a tangle.

By embedding the knowledge of animation within MySprite, every sprite can take care of its own details.