Yea distraction when you see it comin on, if your outside point to something and make a big fuss of it,indoors ask them if they want to play with something different, usually my lil boy forgets what he was crying about in the first place.
But if theat doesn't work and they go into full on tantrum the best thing is ignore it, like Margele said, even if they embaressing you in the middle of shopping by lying down in the middle of a shop!!
Just stand next to them and don't look at them, well except out of the corner of your eye to make sure they don't leg it , eventually they will stand up and play ball, But beware for this method you might get a few people looking and thinking your child is the worst behaved one in the world!! x