The teen, perspiration dripping from his brow, longingly eyes a cool orange soda in the clutches of a young woman. He then strides into a store, buys himself one, eagerly twists off the cap and, just as he is about to gulp, a glowing yellow glob soars through the air and smacks him on the head.

“Don’t get smacked by fat,’’ intones a voice on a commercial. “Calories from sugary beverages like soda, sweet tea, and sports drinks can cause obesity and type 2 diabetes.’’

Hoping to blunt the pervasive reach of sugary drinks, Mayor Thomas M. Menino of Boston and public health authorities unveiled a public awareness campaign yesterday that urges residents to reduce consumption of sweetened beverages, which public health specialists link to rising obesity rates and higher health care costs.

The campaign, which will include a media blitz, premieres a month before an executive order by Menino phases out the sale, advertising, and promotion of sugar-sweetened beverages in all city buildings.

“We are in the midst of a health crisis in the city of Boston,’’ Menino said at a City Hall press conference yesterday. “Forty percent of the kids in Boston public schools are overweight or obese.’’

The $1 million federally funded campaign will blanket Boston with TV, radio, MBTA, Web, print, and billboard advertisements. The program will focus on black and Latino neighborhoods, including Dorchester, Roxbury, and Mattapan, where obesity rates are much higher, officials said. Some of the ads will be in Spanish, and the campaign will air on TV and urban hip-hop radio stations. The ads will run for about six weeks.

About 63 percent of black and 51 percent of Latino adults in Boston are considered overweight or obese, compared with 49 percent of white adults, according to the Boston Public Health Commission.

The media campaign is aimed at two age groups - parents who do the bulk of the household grocery shopping, and teens and young adults who consume more soda, energy drinks, and other sugary beverages than other age groups, according to a US government nutrition study.

The ads addressing parents show children rollerblading with helmets and protective pads, or strapped into a car seat. Near them is a stash of empty cola bottles.

“You do so much to protect them. But maybe you never realized how much these could hurt them,’’ the ad states. “After all, your kids are sweet enough already.’’

The other ads, including the “Don’t get smacked by fat’’ spot, were developed by teens who worked with the Public Health Commission.

Brandon DaGraca, a 16-year-old Boston Arts Academy junior and member of the youth council working on the antisugar campaign, said many young people do not understand how insidious sugar is.

“A lot of teens in Boston aren’t taught the important stuff,’’ DaGraca said. “What I hear from my peers is, ‘You eat too much, you gain weight.’ But it can also be sugar-sweetened beverages.’’

A typical 20-ounce soda contains about 16 teaspoons of sugar and 250 calories, according to the Public Health Commission.

To burn off just those calories, the average adult would have to walk at a brisk pace for 45 minutes, the commission’s data show.

Boston public schools in 2004 restricted sale of sugary drinks, and that has had a significant effect, said Steven Gortmaker, a Harvard School of Public Health professor who tracked high school students’ consumption of sweetened beverages.

His study, published earlier this year, found that since the rules were put in place, students on average were consuming 45 fewer calories a day.

The decline came even as national trends showed no such reduction.

“It doesn’t seem like much,’’ Gortmaker said at yesterday’s press conference. “But it’s the level you need to start flattening out the obesity epidemic.’’

Kay Lazar can be reached at klazar@globe.com.

© Copyright 2011 Globe Newspaper Company.