What we'll cover in this chapter:
Pressing and releasing a sprite
Dragging a sprite
It's likely that a primary goal of your animation is to allow smooth user interaction, and a lot of this interaction will be through the mouse. I talked about mouse events back in Chapter 2, but you haven't really done much with them yet. Now, you'll get some hands-on practice with them.
In this chapter, you're going to take your first steps into the field of user interaction. You'll learn how to handle dragging, dropping, and throwing. But first, let's get started with the basics of press and release.
The mouse is a pretty cool invention, but in essence, it's a simple device. ...