I think the shootings may have hurt ticket sales but honestly without a lot of previous data concerning this type of stuff it's hard to know for sure what kind impact it had.
It could have also sparked more interest in the movie by making people want to go do it.
But I think the thing with the Avengers is that like Jake Said it came off as new and extremely interesting.
First off while yes the bulk of the Thor, Ironman, and Cap's movies were going to have a crossover they still each had their own little market. Thor for fantasy, Ironman for techie sci-fi, and Cap for a little bit of war movie little guy stuff. So they were bringing slightly different audiences.
Also I think there was a lot of buzz with this movie and what it was trying to do and could they pull it off.
And they did and a lot of people were excited over it.
Another possible thing that could have hurt TDKR is that word of mouth has been so mixed on it. With the Avengers everyone was raving on it and said it was awesome.
TDKR not so much. People have seemed to either love it hate or have stated it's the weakest of the trilogy or not as good as TDK. That could have caused many a fence sitters to say hmm I'll wait for it on red box.