‘Iron Man 2′ was a pain in the back for Justin Theroux

April 18, 2010 | 6:10 a.m.

“IRON MAN 2″ COUNTDOWN: 20 DAYS

Tony Stark breaks all the rules (even the one that says superheroes must keep a secret identity), and he always seems to comes out on top — that’s why we love him. But now comes “Iron Man 2,” a film about secret dangers, the sins of the father and the nasty price of modern celebrity. The movie lands May 7 in the U.S., and every day until then, we’ll have behind-the-scenes scoops on the summer’s most anticipated film and a look at all things Iron Man.

One of the quirkier resumes in Hollywood belongs to Justin Theroux, who wrote the inspired and insane “Tropic Thunder” and also directed the 2007 film “Dedication” but is best known as an actor, and has appeared in fare as eclectic as “Mulholland Drive,” “Miami Vice” (2006), “Strangers with Candy,” “Charlie’s Angel’s: Full Throttle,” “American Psycho,” “Six Feet Under” and the sublime “John Adams,” in which he played the (ahem) signature role of John Hancock.

Now, though, Theroux is flying into the summer blockbuster sector as screenwriter on “Iron Man 2.” The franchise’s director, Jon Favreau, said both he and his star, Robert Downey Jr., liked that Theroux’s career has been on camera as well as on the page.

“I like when actors are writers because they’re less likely to saddle other performers with bad dialog,” Favreau said. “And he wrote some really great stuff for Robert and Sam Rockwell, too. He’s just really hard-working, too, he wrote lots of versions of each scene as we sat, read it and made adjustments.”

The way Favreau, Downey and Marvel Studios approach the franchise, the movie is changing throughout the filming; the team does not lock in a script and then shoot it faithfully because so much energy comes from the improvisation of Downey and the sculpting approach by Favreau, who loves to have options. The process doesn’t sit well with everybody; Jeff Bridges, said “Iron Man” was a maddening experience for him at first because the story and dialog would be in constant state of flux.

“I didn’t know where my character was going, what he’s supposed to be,” Bridges said a few months ago. “It was stressful. Then I started thinking of it as a student film. ‘We’re just making a very expensive student film.’ And then I was fine.”

Theroux never found that sort of relief. “His body was torn apart,” Favreau said. “He was having back issues and it was clearly a very stressful period just because of the workload on constantly adjusting and chasing the script as we would have script meetings and improvise and change the content and conceits on the fly, which has become the consistent characteristic between both films. That discovery as you go, as you shoot; there are so many things you can’t change because of the visual effects, but anything you can change is up for grabs as you gain clarity.”

Essentially, Theroux had the trailing position in a marching band that didn’t plan it tune or its path, and that is not an enviable spot. “Justin,” Favreau said, “was the guy following the parade with the broom.”