Joss Whedon has quit as the director and writer of 'Batgirl'.

Joss Whedon

Joss Whedon

The 'Avengers: Age of Ultron' director has confirmed he has departed the movie because he "really didn't have a story", but thanked DC president Geoff Johns and Warner Bros. Picture Group president Toby Emmerich for their help with the project.

He said in a statement to The Hollywood Reporter: "Batgirl is such an exciting project, and Warners/DC such collaborative and supportive partners, that it took me months to realise I really didn't have a story.

"I'm grateful to Geoff and Toby and everyone who was so welcoming when I arrived, and so understanding when I ... uh, is there a sexier word for 'failed'? (sic)"

Whedon recently co-wrote DC Comics superhero motion picture 'Justice League', but it was panned by critics, sparking speculation late last year that he could leave 'Batgirl'.

Such talk was dismissed at the time and he was said to be busily working on the script.

Whedon has previously insisted he has plenty of confidence directing movies.

Asked how he came to helm the 'Avengers' film, the 53-year-old screenwriter said: "I had been telling stories that were clearly superhero-team stories for many years, writing and directing them on a smaller scale. And at same time Kevin Feige was slaving away at Marvel, then was eventually put in charge of it.

"We sat down to talk about a script they had and what I would do with it. I wasn't even aware there was a possibility I could be called upon to [direct]. The more I thought about it, the more I fell in love with it.

"Everyone was like: 'Why did they pick you?' But I fit the Marvel profile perfectly - I had vision and passion and I was cheap."

It's not yet known who will take on the titular Batgirl role, but Alicia Silverstone played the part in 1997 motion picture 'Batman & Robin'.