The sentence as a whole I am not completely sure of the meaning as I am unsure of the context. However, to flank something, in military terms, is to attack or guard from the side e.g. "They attacked us from both flanks" meaning one army attacked another on both sides.
The second part of the sentence "with flying colours/colors" means to do something with a lot of success. For example, if someone passed their exams with 90%-100% then they passed their exam with flying colours.
So with regard to the sentence as a whole, I can only presume an army attacked another army on both sides and had a lot of success.
I hope this helped.