Cult favourite ... TV creator Joss Whedon, pictured on the set of Dollhouse, has experienced his fair share of career ups and downs. Between the three generations of Whedons there probably aren't many lessons about the perils of the craft they haven't experienced. And just as many lessons they chose to ignore. It's why Joss Whedon could find himself in his car in Los Angeles seven years ago, shaking his head at his own madness. He'd just pitched, to a very cool reception among the film executives, a Batman film that would return to the origins of the crusader-vigilante. He was talking personal epiphanies, they were talking franchise. He left empty, they went on to make a blockbuster. You idiot, he told himself. How many more times do I need to be told that the machine doesn't care? The machine is not aware of what is in your heart as a storyteller. That trip ended back in the office just in time to hear that the Fox Network had cancelled Firefly before its first season had even been completed. As Whedon later recounted, he now had his answer to the question posed in the car. “Oh! So, uh, just once more. OK!” But it wasn't just once more. And he knew it. Since that ugly LA afternoon, Whedon, now 46, with an Emmy on the shelf and an Oscar nomination in the drawer, has tallied up a few more examples of why no sensible person should go into the film and television business. And why he can't stop. Obsessive? “People who aren't obsessive go home at the end of the day and don't think about their work,” Whedon says. “I've read about them."

Sarah Michelle Gellar as Buffy the Vampire Slayer. The cancelled Firefly (“still the greatest grief I have about my career”) begat his first film as director, the Firefly “sequel” Serenity. It didn't do Batman business but as a space-western with wit and social consciousness it made money and, along the way, gave him another young female character who – literally and metaphorically – kicked arse. Then he thought he was signed to direct a Wonder Woman film, only to find that was a promise written in smoke rather than ink. But his return to television last year with the series Dollhouse allowed him to begin exploring the moral and social implications of identity, memory and manipulation. That is, until differing views on its direction saw creator and network part ways. The greatest grief of his career ... Firefly was cancelled during it's first season. Whedon ended up reassembling the cast for the film Serenity. Still, Whedon has written two films that are due out in the next year – the horror comedy The Cabin in the Woods (delayed a year by MGM, so desperate for a 3D hit that it's remodelling the film) and Captain America: The First Avenger, the first in a new franchise of comic book-inspired superhero action films that will peak in 2012 with the Whedon-directed The Avengers.

“Right now I'm working on a movie that's got enormous stipulations and is going to be changing and fluid every second. I've come up with dozens of scenes and lines and exchanges and monologues that I adore that are not going to be in it,” he says of The Avengers. “But while I'm writing them they feed me, excite me and they ultimately inform the character. It all goes in.” Exploring new genres ... Joss Whedon created an online musical during the Hollywood writers' strike, starring Neil Patrick Harris and Nathan Fillion. People who aren't obsessive go home at the end of the day and don't think about their work. I've read about them. The issue of inevitable compromise and restraint imposed is a fascinating element throughout Whedon's career. He may have a genuine cult status among the geeks and freaks. He may have created the hilarious and hugely popular online musical comedy-action spoof Dr Horrible's Sing-Along Blog during the 2008 writers' strike. But the bulk of his work has been for mainstream film companies and networks or the relatively conservative end of cable networks. Does he secretly – or not so secretly – prefer an environment that comes with explicit and implicit constraints as a means of sparking creativity? “In a way, yes. I feel that movies got more imaginatively dirty after the Hays Code was introduced in America,” he says, referring to the self-censorship guidelines under which many US films were made between 1930 and 1968. “There's something about having restrictions that does make you want to be sly about how you come at something. I do think that fighting against something, if it's a real creative collaboration, the frisson between what the artist is trying to get out there and what the market place expects, creates very exciting entertainment.”

Whedon's most recent TV venture, Dollhouse, stars ex-Buffy actress Eliza Dushku. The problem can come when you butt your head against a wall and it doesn't break but you do. He's often laughed about the pain of scripts in limbo, of films derailed, of utterly ridiculous decisions, such as a network deciding not to screen the opening episodes of a series until after the rest of the show had screened. More seriously, he says that the cancellation of Firefly not only made him “the sourest man alive” but had an unexpected and potentially devastating side effect. “I stopped having ideas, which for me is an extremely rare experience,” Whedon says. “It was something much more subtle [than losing hope], it took away my ability to think in terms of episodic television. For years.” Superhero focus ... Whedon's next project sees him directing The Avengers, which brings Marvel characters together in one film. He says that almost casually, as if losing the focal point of your life – of your family's life for three generations – was a hiccup. Is one of the skills of being a successful writer and a director being able to handle what you might call these little creative deaths?

“It has to be but I'm not entirely sure that it's a skill that I've learned or know anyone who has,” he sighs. “I have to feel this emotionally raw because I have to believe when I write something it's going to exist. You have to have a certain naivety, almost Memento-like, and get bitch-slapped over and over. "You've got to go in with an enormous amount of confidence because everyone is going to question everything you do. You have to be the person who believes when nobody else does.” It seems that rather than the five stages of grief, for writers there is just one stage: wiping your memory and starting again, like the characters in Dollhouse. "Yeah, pretty much. Anger, anger, anger. Anger. Bargaining,” he deadpans. "Honestly, this year with my career, I've been going, OK, is it over? Are they done with me and is it time for me to start doing really small or make a graceful exit? Because I'm OK. I have my family, I love to write, I'll always write, they can't stop me doing that. "But maybe I'm not going to get my shot to reach a mass audience. But then I got The Avengers. So, clearly, I'm an idiot.”

He describes directing The Avengers as the job “I've waited for my whole life” but says in the same breath that if it was cancelled tomorrow, “I'd go join my family on the vacation I'm not on and start working on things I've put on hold to do this.” Sanguine or fatalistic? “I have always felt, my whole life, that everything could be taken away at any second. It has actually been a huge problem for me that I know that,” he says. “I certainly will do everything in my power not to have that happen, everything in my power to make it good. That's my power, that's all I've got. All I can do is make it good enough for somebody to see it twice.” That's a unique special power. I wonder what kind of costume someone with that special power would wear. “There's a codpiece, so I don't wear it, because a codpiece is embarrassing. Also, I'm always stepping on the cape.” Joss Whedon will speak at the Opera House Concert Hall on August 29 at 3pm. Tickets sold out.