Only trick I knew was to clap with open fingers otherwise your hands clapping will create a wind that will force the fly outwards. Once my apt had these monster flies coming out of the walls. They were just huge, like flying pencil erasers. I got so pissed I could literally punch some of them out of the air. I got a little too carried away and broke one of my windows.