The Avengers was both widely pirated ahead of release and the most successful opening in box-office history. As Forbes's Paul Tassi notes, this suggests that piracy and commercial success are not mutually exclusive:
An early copy of The Avengers actually leaked out onto the internet a week ahead of release, and Disney was subsequently flipping out about the prospect of the full film being released on the web. Shortly after, the camcorder version had been downloaded a half million times, likely a record for the format.
However, despite setting piracy records, all that's really happened is that this has shown how much illegal downloads of in-theater movies really does not effect box office tallies. Even if you're using the skewed math that says every download is a lost sale, the pirates would only make up 0.5% of the revenues of the film so far.
Of course, that's not the case, and anyone passionate enough about The Avengers to download it a week early more than likely had a desire to see on the big screen as well. Even if pirates are "cheapskates" the way they're portrayed, cam copies of movies just aren't remotely in the same league as seeing a movie in a theater. An apt comparison is that piracy of music does not prevent people from showing up to concerts. It's just not a true alternative, especially for a film as epic as The Avengers. It's not a full experience watching a low quality variant on your laptop.
(Thanks, Lis Riba!)