If “Frankenweenie” is any indication, Tim Burton should definitely steer clear of live-action pictures, at which he seems to have lost his touch, and stick to stop-motion work. “Dark Shadows” might have been a disaster, but this is a droll, delightfully macabre little gem. It’s also a charming homage to horror movies of the past—there are references to the James Whale “Frankenstein” pictures, of course, but also to others as varied as “Gremlins” and “The Birds,” not to mention “Godzilla” (and even “Bambi Meets Godzilla”)—as well as a scene from one of Christopher Lee’s Hammer Dracula flicks tossed in for good measure. Connoisseurs of the genre will have a field day counting the allusions.

But enjoyment of the picture won’t be limited to horror fans; because this clever expansion of the director’s early short has enough wit and heart for just about everybody. The “mad scientist” of the plot is young Victor Frankenstein (voiced by Charlie Tahan), who lives with his doting parents (Martin Short and Catherine O’Hara) in a bit of 1950s suburbia named New Holland. He’s a solitary kid, obsessed with making his own little movies in which his only friend, his beloved dog Sparky, stars. After a weird classmate’s prophetic cat predicts something big is about to happen to him, Victor loses Sparky in an accident and decides—under prodding from his grimly intense new science teacher Mr. Rzykruski (Martin Landau)—to try to resuscitate the pooch’s corpse, Frankenstein-style.

The experiment works, but it’s not long before Victor’s secret is discovered by his classmates, all of whom try to duplicate his feat themselves. The result is an invasion of the town’s big annual celebration by a bevy of revived critters—a gaggle of the “sea monkeys” that used to be sold to kids via comic book ads, a grotesquely supersized rat, an oddly cocooned animal of indeterminate species, a ravenous combination of kitty and bat, and a turtle as big as a dinosaur. Naturally Victor and Sparky save the day even as the townspeople take up their torches against them at the local windmill.

As might be expected of a script that has to add second and third acts to a one-act featurette, there’s some structural weakness to “Frankenweenie,” along with an occasional slow spot. But the movie makes up for its minor flaws with a cornucopia of witty dialogue, some deliciously offbeat supporting characters (like Landau’s vaguely Lugosian teacher, a sort of self-homage to his Oscar-winning turn in Burton’s “Ed Wood,” O’Hara’s Weird Girl, with her equally strange cat, and Atticus Shaffer’s ghoulish Edgar “E” Gore) and a striking black-and-white visual design that’s certainly reminiscent of “The Nightmare Before Christmas” and “Corpse Bride” but none the worse for that.

Victor and Sparky, meanwhile—along with Danny Elfman’s typically ethereal score—provide the picture’s heart, making for a boy-and-his-dead-dog fable that’s an irresistible mixture of sentiment and spookiness. Though Burton might have let his passion for spectacular razzmatazz get the better of him in his recent live-action films, in this case the style is at the service of the story rather than dominating it.

So Burton has returned to his youthful roots and disinterred a treasure, a Halloween treat for the family trade. It would make an excellent double-bill with the recent “ParaNorman,” another stop-motion movie about a boy and the recently departed, which took quite a different approach but an equally effective one. Any filmmaker tempted to approach similar material in the future will face stiff competition indeed.