Change the slope in the code. Use the arrow keys to move the sprite back and forth along the line. If you think about relating the change in size of the character and the slope of the line, you can create the illusion of moving in and out of the screen.