Comedian Dane Cook performed a set at the Laugh Factory in Los Angeles on Thursday, when he made a joke about the movie-theater shootings in Aurora, Colo. The joke led to significant online criticism of Cook, even though he eventually apologized with a statement of remorse for his words.

"So I heard that the guy came into the theater about 25 minutes into the movie," Cook joked. "And I don't know if you've seen the movie, but the movie is pretty much a piece of crap. Yeah, spoiler alert."

Cook continued, "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---in’ shoot me.'"

The joke was met with groans by the audience, but they soon gave way to laughter and applause. However, online reactions have not been so understanding. His joke at the Laugh Factory led to bloggers and and other online commenters criticizing Cook, both personally and for his performance.

Cook apologized for his remarks on Friday, taking to both Twitter and TwitLonger to write: "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. My heart goes out to all of the families & friends of the victims."

Cook’s Aurora shooting joke comes on the heels of another controversial comedian provoking online outrage. Daniel Tosh, known for his Comedy Central program "Tosh.0," made jokes about a female audience member personally being raped at a show this month. Tosh also publicly apologized for his words via Twitter.

Was Cook’s joke OK? Was it too soon? Or was it unacceptable to joke about at all? Watch Cook's delivery of the joke below.