A locker room sex scandal at Milton Academy resulted in painful life lessons for a group of students who proved capable of frighteningly casual sexual attitudes and behavior.

A locker room sex scandal at Milton Academy resulted in painful life lessons for a group of students who proved capable of frighteningly casual sexual attitudes and behavior, and awoke many parents to the need to talk with their teenagers about the the risks and consequences that come with sexual activity.

A new book coming out Tuesday, ‘‘Restless Virgins: Love, Sex and Survival at a New England Prep School,’’ reopens that shocking chapter from the 2004-2005 school year and the alarming sexual and social depravity that allowed it to happen.

The academy was thrust into the national spotlight following revelations that a 15-year-old female student had performed oral sex on five academy hockey players in a locker room. The boys, ages 16 to 18, ultimately were expelled. Upon further investigation, it was found the incident was the first of three encounters the girl had with several of the same hockey players, and exposed troubling and complacent attitudes about underage sex.

In Massachusetts, anyone having sex with a child under 16 can face prosecution. And that’s what happened to the five hockey players involved in the incident. Yet some young people were disturbed that what they considered a consensual matter had become a legal issue. And even some adults thought prosecuting the young men under the state’s statutory rape law was archaic in our time of sexual acceptance and sophistication.

But larger lessons needed to emerge from the incident. Young people must understand that bad choices can be very costly. That goes for sexual or any other activity in which peer pressure, coercion or intimidation may come into play, opening up possibilities for emotional damage or physical harm. And it can happen whenever a desire for social gratification or notoriety comes before a decent sense of respect for oneself and for others.

A parent sending a son or daughter away to school can only hope that lessons instilled at home will provide enough guidance for the unsupervised situations that inevitably come for a newly independent teenager. Children, for their part, have more concerns and fears than they’re often willing to share with mom or dad.

The Milton Academy sex scandal created a teaching moment for teenagers and their parents, reminding us all of the importance of an open, accepting, two-way dialogue about the beauties and dangers of growing up. Young people pick up a lot about our dangerous adult ways from the media, the Internet and each other. Helping them to understand and deal with the risks awaiting them can make all the difference.