I agree with Audrey Quest and Redsoil - no need for an icy stare or to put people on the defensive. Just casually make it known you are flattered but not interested and move on.Men who make passes at random women don't need the message that their attentions are flattering- they already believe that women are or should be incredibly flattered at their attentions. Telling them that she's flattered only rewards them and makes it more likely they'll repeat their behavior, either to her or to another unwilling recipient. A statement along the lines of, 'Let's keep this on a professional level, please. What related to my job duties can I do to assist you?' is more likely to get the message across.
If you convey how flattered, or how nice they are being, but you need to remain professional, will be as a big flashing green light of "Yippee! She enjoys my attentions!" and they won't be catching on much to the latter part of your statement.
As suggested, straight-forward and to the point I would think is the best solution. I wish you well in your new job, it sounds exciting in all the other areas.
Again, I never suggested conveying to them how flattered one is. My suggestion of what to say is just one possibility depending on how strongly someone comes on.
Silence usually works fine as well. They know you heard them but you don't react to it at all.
It is however empowering to assume that their intentions, while innappropriate for the situation are not malicious. It puts them into a context that makes them easier to deal with.
I have never found that having anxiety or awkwardness about a situation, or being defensive, is conducive to conveying easy confidence and boundaries.