How can I create a train on track?
You can either use either of these two resources or you can take a gander at the code to come up with what you want: