Define flaming? I'm assuming you mean general insults. In that case,
Just take a look at sports. Almost every player flames not only their teammates and opponents but EVEN THEMSELVES.
Ask players what they're thinking after making a mistake. You'll get answers like "I'm such a fucking idiot" "I can't believe I did something so stupid" "Am I a dumbass or what?"
Ask players what their teammates tell them after making a mistake and they may say "That was dumb as fuck" "Man, you gotta do better" "Really? And you practiced that HOW many times?"
Ask players what their opponents say and it'll be "My grandma plays better" "Good one" <-Not sure you consider that one flaming? Sarcasm is apparent when said "Gotta get good, scrub" "I'm glad you're on the other team"
Now, in regards to the overall question of "Does this motivate you?" athletes will say "It doesn't matter, because I'm motivated anyway." Maybe I'm just being a generic motivational speaker, but demotivation is a choice. It's a feeling you acknowledge, accept, and agree to. Nobody MAKES you feel bad, you choose to feel bad. Just the same, you can choose not to. So what if someone points out your mistake? Tell yourself you'll never make it again. Someone calls you stupid? Get smarter. Someone calls you ugly? And? That's an opinion. You're only as ugly as you decide you are not according to others. Someone calls you short? You were born that way. They'll get over it. Sometimes literally.
Now, none of this applies to idiotic harassment, merely criticism. Then again, you might consider harassment flaming too.
In that case, that's not motivating at all.