Control the sprite's x-position with the keyboard: the right arrow moves the sprite to the right, the left arrow moves the sprite to the left. The sprite also needs to say if it is on the right or left side depending on its x-position. Right now, the sprite is moving, but not saying the correct position.