I now use waterproof fly boxes. After I use a fly I never put it back in the box until it dries out. Also, I tape a foot-long piece of string to my small fly boxes, then I put a loop in the other end of the string. Finally, using a safety pin, I secure the loop to my vest. That way my box won't fall into the water.
Last season this system worked for me, but in the end, nothing is foolproof.
Randy