the anim is a array that tells how many "frames" goes by and to change the sprite based on how long the button is pressed down. spchr is a command to change the sprite to the one you want so thing like anamation can take place.vsync waits the specified frames in this case 1 before going to the next line.here the x concordinent is add by one to move the sprite up the screen becase of spofs x,y.