Walk The Moon was the big name at the fifth annual Stars and Stripes festival held on Friday night at Flatbread, but two local kids proved they were ready for the limelight too. Leah Hairston and Robert Hanjian opened the sold-out show to benefit the YMCA of Martha’s Vineyard. To date, the festival has raised close to $500,000.

Both Leah and Robert attend Alex’s Place, the teen center at the YMCA that includes a professional recording studio, stage and club.

“Along with the firm handshake and the eye contact, we like to give these kids an opportunity to perform, gain self confidence and get to know themselves,” said Laurel Redington, assistant director of Alex’s Place.

Leah took the stage first, performing House of the Rising Sun by The Animals.

Flatbread was filled to capacity for YMCA benefit concert. — Peter Simon

“It is really nerve-racking, like, I kind of have butterflies in my stomach, but I am really happy I am doing this,” she said moments before taking the stage. Demure at first, she bellowed out the song with a voice and confidence that belied her mere 12 years of age.

Robert performed the acoustic version of Fade Away by Oasis, to raucous applause from the audience.

Festival newcomers Santah followed the two local acts. Alex Winston rocked the stage next in a midriff baring crop top and long black skirt. At one point, Ms. Winston descended into the audience and let loose with festival co-founder Lizzy Plapinger. Zoe Silverman, one half of electronic-R&B band Astr, and the festival’s third act, asked for technical assistance during her performance.

“Can someone help give me some freedom? It’s the Fourth of July!” She was referring to a microphone that was tethered to its stand by a too-short chord.

Festival co-founders Derek Davies and Lizzy Plapinger met on Martha’s Vineyard, where they spent their summers as kids. “Our most formative experiences happened on this Island,” said Mr. Davies.

Most of the performers have a tie to the Island too. Vivian McConnell of Santah is a childhood friend of Mr. Davies and Ms. Plapinger. Headliners Walk The Moon met songwriting team Captain Cuts, with whom they wrote Shut Up and Dance, when they performed at the 2013 edition of Stars and Stripes. The partnership that led to the hit single was formed during their first visit to the Island.

“It’s a fitting return for them because Shut Up and Dance was born here in a way,” said Mr. Davies.

The Alex Winston band owned the stage early on.

For the show, Walk The Moon waived their now very high performing fee. The Beach Plum Inn provided accommodations for the band members and their family.

“We are so happy to support an awesome cause and this is an amazing place to spend a weekend,” said lead singer Nicholas Petricca, in an interview before the show. “And we got to bring our family. My mom is here and so we are making a weekend out of it.”

Flatbread was filled to capacity by the time Walk The Moon took the stage. Fans spanned generations. Seven-year-old Liam Higgins put in an appearance early in the evening.

“Walk The Moon is one of my favorite bands,” he said. “It’s really cool to meet somebody really famous,” he added, referring to Mr. Petricca. Liam has met other public figures, too. “I’ve met Obama like five times actually. But I think it was more exciting to meet him [Nicholas] because I know Obama so much already,” he said.

Walk The Moon opened its set with Anna Sun, a single off its 2012 self-titled album. In addition to performing original material, Walk The Moon covered patriotic anthems like Miley Cyrus’s Party In The U.S.A. Mr. Petricca performed Different Colors, released in 2014, whose message the band is passionate about.

“It’s about diversity and celebrating one another’s differences,” he said. “We have to not just tolerate each other’s differences but embrace them, and we are aware that this is a platform from which we can shout with a megaphone, so we don’t take that for granted.”

Walk The Moon closed with its big hit, Shut Up and Dance. Less well known, though, is the story that inspired the lyrics. “We hit a roadblock with one of the last songs we were writing for the album,” said Mr. Petricca. “We had a song but no chorus, so I went out to a club called Echo in L.A. I was trying to get a drink at the bar and it was taking forever, so I was having a shitty time. I was like, this sucks. Then my best friend, who I was with, she was wearing a backless dress and beat up red sneakers, said, ‘just shut up and dance with me.’ So it’s about getting out of your head and entering into the moment, and letting go.”

And the crowd did just that. They literally shook the dance flooryoung, old, summer, Islandereveryone entered the moment to celebrate music and dance, the YMCA, and the never ending potential of another Island summer.