Here's a good fly food recipe I got from Kammerflage:
Since the flies emerge with empty stomachs, you will want to "gut-load" the flies to make them nutritious for your chameleons. You can mix a soft-boiled egg (mashed to a smooth consistency) with a few teaspoons of plain yogurt, baby rice cereal and some honey.
Just make sure it's pretty thick and sticky and smear some on the side of the fly container. I made my first batch too liquidy and drowned almost all of my flies and pupae!