How to make train on railroad tracks?

I have a line (my tracks) and a train (right now it's just and arrow). How do I make it so the arrow can ride along the line and follow its path? Also, the path is made with this code -

local outline = display.newRect( 15, 15, 290, 450 )
outline:setFillColor( 0, 0, 0 )
outline:setStrokeColor( 25, 0, 250 )
outline.strokeWidth = 2

Should I be doing it differently?

This isn't a Feature Request. Ask in the right place and after I get home I'll post the method I used when I wrote this game years ago:
http://www.newarteest.com/games/rrailroad.html

views:1773 update:2011/9/18 14:43:09
corona forums © 2003-2011