six legged walker

5V @ 1 amp is not likely enough to power 12 servos at one time (a single standard servo can easily pull up to amp of current by itself, under load; yours are smaller servos though); what is powering the Arduino? You should first figure out a few things before delving into the code as being an issue:

  1. How much current does a single servo take (and since you are using two different brands of servos - measure each) - when under load and without a load?
  2. How many servos are going to running under load -at the same time-?

Multiply the maximum current from 1) with the number of servos from 2) - this will give you a rough number of the amount of current needed for the servos. Add an extra 250-300 mA or so for the Arduino (if being powered by the same supply).

I have a feeling you are trying to run the servos from the same supply as the Arduino (this is just a guess though; it isn't clear from your post); if so, likely a current sag is happening, causing the Arduino to constantly reset. Given that you can -sometimes- get it to work, I wonder if you are somehow right on the edge of what is needed current wise, and sometimes things "settle" just right (or not as many servos move at one time in a gait cycle, or the same number aren't loaded, or something), allowing it to work briefly?