Did that actually work for good though? I tried what claire999 said and the flies just came back. I ended up needing to find the drain they were breeding in.
Did you try freezing your scraps before adding them to the bin? I started doing that and it cut way down on any bug issues once they thawed and broke down slower.