Generally it's frowned upon, much like sleeping with other people, flashing other people, wrestling with other people while you're in a relationship. There are some things that you just shouldn't do.
But there is an except to the flirting rule: if you and your boyfriend were to both benefit from your flirting (and your boyfriend is okay with it), I think flirting is okay.
Say you were out at a jewelry store looking at a necklace and your boyfriend was at home, dutifully playing Call of Duty and some random Joe comes into the jewelry store and starts up a convo with you and tells you how beautiful you are, etc. You can play that up because maybe you'll get some free jewelry out of it, which in turn is good for your boyfriend because he won't have to pay for jewelry and can spend his hard-earned money on something else for you two.
Beneficial flirting is definitely okay. Shucks, when me and my girlfriend go out, I ask her to flirt with the male waiters so hopefully we can get a free drink or something.
But other than that, no. You should respect your man's desire to not have his woman out there looking loose and floozy like by smiling and cooing all up in some random guys face. Would you like it if your boyfriend was out there touching on some other woman's elbow? You wouldn't like that, would you? Nope.
It was written