Dane Cook is using the Colorado shooting tragedy as material for his standup act.

Last night, Cook took the stage at the Laugh Factory on Sunset Blvd. and began to talk about "Dark Knight Rises."

In footage, obtained by DailyCaller.com, Cook can be heard saying ...

"So I heard that the guy came into the theater about 25 minutes into the movie ... 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*cking shoot me.’”

A bunch of people in the crowd laughed ... some people groaned. A bunch of people in the crowd laughed ... some people groaned.