On Thursday afternoon at Sheridan Communications & Technology Middle School, a group of 50 students sat transfixed by a video of a space shuttle blasting off. Just another middle school science class — except that most middle school science classes are not taught by men who have logged 734 hours in space. And most middle school science classes do not end with actual astronauts issuing invitations to work for NASA.

But this one did. As the onscreen rocket disappeared into the atmosphere, astronaut Dan Barry looked around the room and said, “That ride was about eight and a half minutes, and you go from zero to 17,000 miles per hour. Anyone interested in coming along?”

Nothing was typical about Thursday at Sheridan — least of all the guest list. Barry, the teacher for the day, was accompanied by the director and associate director of a NASA flight center, and the “class” included not only fifth- and sixth-graders but New Haven Mayor John DeStefano Jr., U.S. Rep. Rosa DeLauro and New Haven Superintendant of Schools Dr. Reginald Mayo.

The impressive speakers and attendees were at Sheridan because of an educational partnership with NASA that the school began last spring. The goal of the three-year partnership is to encourage middle schoolers — mainly those in “under-served” communities — to focus on the study of math, science and technology. As one of only 50 Explorer Schools nationwide, Sheridan receives yearly technology grants, support for curricular innovations, and, as Thursday’s events attested, even the occasional visit from an astronaut.

During this particular visit, Barry told the assembled fifth- and sixth-graders how it feels to be in space, explained what the earth looks like from a shuttle and discussed the possibility of life on Mars. But his most important message to the middle schoolers was one of encouragement, as he reminded them that the first person to actually step onto Mars will be someone from their generation.

“You guys are the perfect time to be the folks who actually get on board this [shuttle] and go to Mars, and as an Explorer School, you’re on the inside track,” Barry said. “You can’t be in a better position. I kind of wish I was in your shoes.”

Alison McNally, associate director of the Goddard Flight Center, echoed Barry in her speech to the class.

“It really isn’t that far from Connecticut to University of Connecticut to NASA,” she said. “You can be in the control room.”

Afterward, she watched Sheridan students pose for photos with Barry and noted how meaningful it is for the kids to meet actual astronauts.

“We really do believe that the person who can be on Mars is one of them. We want to make sure that we can help, that we inspire folks to work hard at math and science, to stay in school, and to work for NASA,” she said.

Nick Strohl ’04, Sheridan’s public school intern for the year, said that like a recent Sheridan field trip to Yale’s science labs, the astronauts’ visits are a great way of rewarding the school’s students — and of demonstrating outside support for their achievements.

“This is a great display of the community coming together to support a project like this,” he said. “It’s always exciting when you can get so many different people from the community into the school — and NASA, being a national organization, that’s especially exciting.”

The middle schoolers, many of whom were recent science fair winners or members of Sheridan’s robotics team, seemed excited by the visit. After the presentations, they ran around getting autographs from Barry, McNally, Goddard Flight Center Director Alphonso Diaz and the mayor.

“This is really cool,” sixth-grader Ebony Dorsey said. “The astronaut is a nice guy, but it’s most important that he wants to do good things for people.”

As for one day following in Barry’s footsteps, sixth-graders Elizabeth Portocarrero and Ebony Greene appeared amenable to the idea.

“I want to ride in one of those,” Greene said.