Kenneth Branagh took charge of the film, but Whedon was drafted in to shoot a scene that aired after the credits, which sets up comic book fans for his The Avengers movie and features a cluster of modern movie superheroes, including Thor and Iron Man.
In the scene, Skarsgard's character Erik Selvig meets Samuel L. Jackson’s Nick Fury, who shows the scientist a mysterious glowing cube - as Thor's evil half-brother Loki looks on.
And now the Mamma Mia! star tells Empire magazine Whedon took over from Branagh for the clip.
He says, "I flew over there and went down into a basement and talked to Sam for a couple of minutes and went back... That was with the director Joss Whedon, who's doing The Avengers."
But Skarsgard refused to go into any details about the top secret The Avengers movie: "I know what's gonna happen to my character in that film, but I'm not allowed to say anything because I'd have to sell my house to pay for the fines for that."