Editor’s note: Though he’s worked as an actor during the past four decades, Hamlin said he’s working on his first studio movie in 40 years.

Harry Hamlin’s starring in his first studio film in 40 years.

In 1982, his career shifted from movies to television after his portrayal of the gay man, Bart McGuire, in “Making Love.” The film was the first gay-themed love story to be produced by a major film studio.

“They had offered this part to every movie star in Hollywood, and everybody turned it down for the reason that they thought it would end their careers,” the “L.A. Law” actor said. “They were not exactly wrong about that. I took it because it was something real, that was going on at the moment. I knew it was risky and it proved to be risky.”

He described Hollywood back then as a “cowboy town,” and studio execs were perplexed because they felt Hamlin couldn’t be cast with a female love interest because of the past role. “The studios saw a gay film, they saw a gay love story and they saw me as half of that love story.”

Hamlin isn’t at all surprised that we’re still talking about the film four decades later. “It was way ahead of its time,” he said.

These days, the actor has no shortage of roles.

He’ll be starring alongside Jane Fonda, Rita Moreno and Sally Field in the Tom Brady movie “Eighty for Brady,” among other projects.

“I’m totally busy than I’ve been in many, many years. I took 20 years off to raise my kids,” he said. “I wanted to stay in L.A. and not be on location. I wanted them to be able to put them to bed at night.”

Hamlin’s family life has stayed at the forefront, mostly due to his longtime marriage to actress and “The Real Housewives of Beverly Hills” star Lisa Rinna. The couple just celebrated 25 years of marriage. When it comes to revealing the secret of long- lasting love, Hamlin offered some tips.

“I think probably listening is the most important thing,” Hamlin explained. “A good roll in the hay is also not bad.”

You can catch the 40th anniversary screening of “Making Love” at the Academy Museum on June 23rd. For information, head to academymuseum.org.