When is the right time to joke about a tragedy, especially one on the scale of the movie theater shooting in Aurora, Colo.? “Never” might be our answer. But then, we’re not Dane Cook . Just days after 12 people died in a hail of gunfire at a midnight screening of “The Dark Knight Rises,” the Arlington-bred comedian joked about the massacre this week at LA’s Laugh Factory. Cook (inset) quipped that the movie is so bad that “ . . . if none of that would have happened, I’m pretty sure that somebody in that theater, about 25 minutes in, realizing it was a piece of [trash], was probably like, ‘Ugh, [expletive] shoot me.’ ” Judging from a video taken by an audience member, the line was met with a few groans and then mild applause punctuated by a few hoots and hollers. But online, many many people tweeted their anger, accusing Cook of trying to capitalize on the shooting. Fellow comedian Jim Florentine , meanwhile, came to Cook’s defense. He tweeted: “If u are offended by ANYTHING AT ALL stay home n watch Touched By An Angel Reruns!” But, perhaps reacting to the opprobrium, Cook apologized later Friday. “I am devastated by the recent tragedy in Colorado & did not mean to make light of what happened,” he tweeted. “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 is just the latest cut-up to catch flak for joking about a tragedy. Last year, Gilbert Gottfried got himself into a heap of trouble when he tweeted tsunami-related jokes the day after a massive earthquake devastated Japan.