Alleged comedian Dane Cook has apologized for an ill-timed joke about the shooting at an Aurora, CO theater in which 12 people were killed during a midnight showing of "The Dark Knight Rises".

Cook was performing at the Laugh Factory in Hollywood Thursday night when he made the joke which got a mixed response of laughs and groans, along with a huge internet backlash.

He said, "This movie is pretty much a piece of crap. I know that if none of that would have happened, pretty sure that somebody in that theater, about 25 minutes in, realizing it was a piece of crap, was probably like, 'Ugh, f---ing shoot me.'" 

He later issued an apology on Twitter, saying, "I am devastated by the recent tragedy in Colorado & did not mean to make light of what happened. I made a bad judgment call with my material last night & regret making a joke at such a sensitive time," adding, "My heart goes out to all of the families & friends of the victims."