Death to Smoochy

Give “Death to Smoochy” 20 minutes or so to get its wheels on the tracks, and then sit back and enjoy as the proceedings turn dark, macabre and hilarious (if you can bring yourself to laugh at such things as murder and revenge, anyway).

It is the story of children’s TV star Smoochy the Rhino — think Barney the Dinosaur — whose alter ego is Sheldon Mopes (Edward Norton), an endlessly polite vegetarian who has no idea what a dork he is. He wouldn’t appreciate you using words like “dork” in his presence anyway, thank you.

He rockets to TV stardom when he’s hired to replace Rainbow Randolph (Robin Williams), a vaguely homosexual song-and-dance man whose show was canceled after he was caught in a public scandal. He’s a bitter, foul-mouthed guy — think Krusty the Clown when he’s not on camera — who generally refers to himself as “Rainbow [expletive] Randolph.”

Randolph is angry over the success of his successor and plots revenge. Meanwhile, Sheldon, who has a “fetish for ethics,” is struggling with the realities of the TV business. His boss, Nora (Catherine Keener), is cynical and hardened and wants the show to be nothing more than a commercial for Smoochy products. His agent, who is played by Danny DeVito, is exactly what you’d expect an agent played by Danny DeVito to be like.

Sheldon gets tangled up with the Irish Mafia, too — presumably because the Irish Mafia is funnier than the Italian one — when one of their members, a brain-damaged former boxer named Spinner (Michael Rispoli), joins the ranks of Smoochy fandom.

The script, by Adam Resnick (a former David Letterman scribe and Chris Elliott compatriot), is peppered with witty dialogue and dark twists on congenial themes. Children’s TV is a vicious underworld here, and the non-profit “for the kids” organizations that support it are just as bad. (One such group, Parade of Hope, run by an evil Harvey Fierstein, is described as “the roughest of all the charities.”)

Some of the best dialogue cannot be printed in polite company (though we will mention Smoochy’s wonderful educational song, “My Stepdad’s Not Mean, He’s Just Adjusting”). This is the rare film where the profanity is necessary. Half the fun is in hearing people use outrageously crass language in front of Sheldon/Smoochy, who is appalled but too polite to rebuke the offender.

Robin Williams has not had this much fun in years; it is a relief to see him genuinely funny again, and not sanctimonious or righteous. Edward Norton loses himself in the role of Sheldon, and Catherine Keener is a good sport, too. (Let us also not forget Jon Stewart as a whimpering TV yes-man, and Pam Ferris as the Momma of the Irish mob.)

DeVito directed the film, and it recalls the dark sense of humor he employed in “The War of the Roses” and “Throw Momma from the Train.” Yet for as dark as it gets — and there is death in “Death to Smoochy” — it has the aura of giddy, good-natured cartoonishness about it. And besides: Beating up a guy in a foam-rubber rhino suit is just plain funny.

A- (; R, frequent harsh profanity and vulgarity, some violence, one brief bit of sexuality.)