I just taught my horse to do flying lead changes this last year, this fall we were able to do them on a straight line for a horsemanship test. It takes a lot of work!
I worked with my trainer the entire way, so I could have another set of eyes on the ground to see when he was getting it or cross firing, etc. Before I even tried flying lead changes I did a LOT of the basics! Control over the hip at all gates is essential, that's where you control a horse's lead. I was once told at several clinics that if you get a horse to change from their hip, you won't have any cross firing problems (99.9% of the time).
After I had 100% control of the hip we had to have control of the leads. I did a lot of counter cantering, and riding down the middle of the arena on one lead, stopping in the middle and asking for another lead (so he understands my cues and it's not just automated by which direction we're going). Like others said LOTS of simple lead changes, and I switched it up by switching through a stop, switching through a walk, switching through a trot, etc. with the goal being have one step transitions.
Two-tracking helps a lot as well, I had to be able to two-track both directions at all gates for my horsemanship test, so we did a lot of work on this before lead changes as well. Another technique I heard of and tried a little bit was a variation of a simple lead change. You canter on circle, stop side pass towards the middle of the circle you just did a few steps, and then canter a circle in the other direction, etc.
When I started actually asking for the flying lead change, I used a pole. It helped my horse understand what I wanted and made it easier for him to perform a flying lead change while still learning it. Soon I was able to take the pole away, and then I just practiced, practiced and practiced. A famous horseman once said (I cannot remember who though... sorry) the best thing for perfecting lead changes is just doing them. He said he would put hundreds of lead changes on his horses. Of course you want to pace yourself, but time is best for a complicated task like this one. It also takes a lot of muscles, so you have to wait for your horse to build them up over time.
After several months of flying lead changes on a figure eight I started asking for them on the straight of way by doing a figure eight around the WHOLE arena, making the changes in the middle.
Slowly I would make the straight part (pink) long and longer, until I was able to canter straight down the arena and ask for a lead change.
I know I'm probably missing some steps, it's been a little bit since I've gone through this and it's not fresh in my mind. You had some excellent tips in the prior posts as well though :)