Real time graph plotting

i need to do smthg similar… do u guys have any idea how the graph is plotted while the car is moving?

im having so much trouble trying to do that :S :S :S

http://faraday.physics.utoronto.ca/PVB/Harrison/Flash/ClassMechanics/MotionDiagram/MotionDiagram.html