Okay, I really want to know why the sandwhich bag trick works.... so I googled it!
Repel Flies with a Bag of Water - Annoyances - Lifehacker HowStuffWorks "Flies and Water Bags"
The flies, being so skiddish, see the light refractions from the water (probably helped out by the bag) and get scared at the slightest movement from any distance.
Might want to make sure to close the bag up, or else you'll get a mosquito problem....