You basically just do what Champ says.
This is a school project, so it isn't original. (also, this won't work on iPad)