“A boy needs to spend time with his friends,” Victor’s father (Martin Short) protests. “I don’t think he has any friends,” his mother (Catherine O’Hara) replies, “other than Sparky.”

Yes, with the possible exception of gentle Goth girl Elsa Van Helsing (Winona Ryder) and science teacher Mr. Rzykruski (Martin Landau), Sparky is Victor’s only ally in the straight-jacketed suburbs of New Holland. So when the playful pooch is hit by a car, Victor takes it particularly hard.

If only he could save Sparky. If only he could bend the laws of nature and bring his beloved pet back from the dead.

Inspired by a classroom science experiment, Victor stitches together Sparky’s corpse, attaches bolts to its neck, and hoists his ironing board/operating table to the heavens. A lightning storm does the rest.

Victor tries to keep his Franken-fido under wraps. But when his classmate Edgar (Atticus Shaffer), a hunchbacked kid who sounds an awful lot like Peter Lorre, spots the undead dog rooting through the trash, he’s forced to share his secrets.

Tim Burton has experienced a bit of a creative dry patch in the last few years, churning out commercial blockbusters such as “Alice in Wonderland” and “Dark Shadows” that were long on style and short on substance.

Fortunately, “Frankenweenie” represents a true return to his roots. Based on the 1984 live-action short Burton crafted as a Disney animator, this black-and-white beauty is at once a quirky supernatural comedy in the vein of “Beetlejuice” and “The Nightmare Before Christmas,” and a tribute to his influences: Japanese monster movies, Universal creature features and other ghoulish horror flicks.

It’s a marvelously macabre family film — one that references everything from “Gremlins” to “Gamera.” Heck, Victor’s cookie-cutter neighborhood is straight out of “Edward Scissorhands”

“Frankenweenie” isn’t quite perfect. (The ending, for instance, is rather abrupt.) But it’s such a charming movie, packed with cute and creepy moments, that it’s easy to overlook any flaws.