Hi S. -
So many responses! I'll chime in here as well.
When my little one acts badly, I take him from the situation. That is his punishmenet. And I say "Oh, it's too bad we have to leave now. When you act this way, I know you need some time to yourself." It sounds like a simple thing, but it has worked for me. If we are in the mall and he cuts up, we leave. At a friends house and he throws a temper tantrum, we leave. In the grocery store, we leave. Yes it is inconvenient, but he has learned that we don't misbehave. When he throws tantrums at home, I change his setting - usually putting him in his room and telling him he can come out when he's acting like a big boy.
I don't yell or scream - I don't feed into the negative behavior. Paying attention to him when he's acting out leads to more acting out.
I got these strategies from Love and Logic: Magic for Early Childhood (Practical Parenting from Birth to Six Years) by Jim Fay and Charles Fay. They book is written in a hokey manner, but it has worked for us.
I would be concerned when my friend's child misbehaved - especially if there was harm to my own. Removing your own child from the situation can be a lesson as well. As you break up the play party, I would tell the children that when we misbehave it's time to leave.
Good luck with your problem!