James Franco premiered his latest project, “King Cobra,” directed by Justin Kelly and starring Christian Slater and Keegan Allen with cameos from Molly Ringwald and Alicia Silverstone, at the Tribeca Film Festival Saturday night.

Inspired by a true story, Slater stars as Stephen, a gay porn producer behind the company King Cobra, who takes on a new star, Brent Corrigan (Garrett Clayton). When Corrigan wants out of his contract, Stephen refuses. The Viper Boys, two rival porn producers played by Franco and “Pretty Little Liars” star Allen, pledge to help Corrigan out, and decide to brutally murder Stephen.

Kelly knew it wouldn’t be easy to make a film about gay porn, and credits Franco with getting the movie off the ground.

“He knows that attaching himself to a project will help get it made,” Kelly told Variety. “So he’ll find people whose work he loves and he’ll make sure their work gets out there,” Kelly said. “It’s a very generous thing actually.”

Gus Van Sant introduced Franco to Kelly, an editor on “Milk,” and they worked together on “I Am Michael.” Franco pushed Kelly to make “King Cobra.”

“I was like ‘Justin, come on man, you’ve been sitting around for a year and a half or more,'” Franco said. “You’ve got to just do something. What do you want to do?”

They landed on the true-crime story based on the book “Cobra Killer: Gay Porn, Murder, and the Manhunt to Bring the Killers to Justice,” by Peter A. Conway and Andrew E. Stoner, and a film that feels like “Place Beyond the Pines” meets “Spring Breakers.”

Franco’s character is a wacky, violent, gold chain-wearing porn kingpin, with a series of graphic, campy sex scenes with his gullible partner Harlow, played by Allen.

“We could go pretty large with our characters, they are pretty ridiculous,” Franco said. “Justin Kelly calls them G.T.L. — gym, tan, laundry — kind of guys. That’s all they do, go to the gym, tan, and do their laundry.”

Franco helped bring on Slater, who he worked with on last year’s “Adderall Diaries” that also premiered at Tribeca. Slater said the role was out of his comfort zone.

“I remember when I saw ‘Brokeback Mountain’ and I had such a visceral reaction to that movie, and thought, ‘Oh my god, I could never do anything like that.’ And as I’ve gotten older, I think I have gotten less judgmental about things and hopefully a little bit more mature about these subject matters,” Slater said.

“I’ve never played a homosexual before and I just didn’t want to, I guess bring any stereotypical nonsense to it, or do any kind of caricature-y type things that I’ve seen in other films. I just wanted to be a human being who happens to like young men,” Slater said.

Franco also helped attract talent like Ringwald and Silverstone, who have small roles in the film. Ringwald, who has been largely absent from the big scene in recent years said at a Q&A after the film, “I was just happy to be in a movie where all the guys had to take off their clothes.”

Director Kelly; producers Scott Levenson and Jordan Yale Levine; actors Franco, Slater, Clayton, Ringwald, Silverstone, Spencer Lofranco and RJ Mitte; and designer Christian Siriano attended the premiere.

An after party for the film was held at the Box.