Alternately, if he's single or unhappy in love, ask yourself if it's likely that he's jealous or feels left behind.
While your boyfriend's friend is entitled to his opinion of you, you're entitled to respectful treatment when he's around.
In other words, you might get what you want (excitement, validation, potential), the friend might get what he wants (a fling), but your boyfriend is the big loser.
But here's the good thing about your scenario: It can help you learn something about your relationship and yourself.
So stop and think: What is it about your boyfriend's best friend that you're drawn to?
Bear in mind that he may not be basing his judgments on you, but on your boyfriend's past girlfriends.
This may be especially true if he has a history of dating women who the friend feels weren't good for him or who got in the way of the friendship somehow.