People talk about the terrible twos, but given the way movie sequels have been going lately, maybe cinematically we’re going to have to start referring to the terrible threes. First there was “Spider-Man 3” and now we have “Shrek the Third”—neither of them terrible pictures, but both falling so far below their predecessors that they have to be judged major disappointments, though in different ways: the “Spidey” installment was bloated and overstuffed, while the new “Shrek” is just sort of blah, a shapeless chain of uninspired gags that never builds up much comic steam.

It certainly doesn’t help that the script, credited to no fewer than five writers, is strangely reminiscent of the recent animated bomb “Happily N’Ever After.” As in that misfire, the story deals with an attempted takeover of a fairyland realm, this time of Far Far Away, as it’s called, by Prince Charming (Rupert Everett), who feels cheated of his realm by Princess Fiona (Cameron Diaz) and her loving hubby, the Ogre Shrek (Mike Myers).

When Fiona’s father, Harold the Frog King (John Cleese) is at point of expiring—Cleese gets a funny extended death-bed bit here—he tells the reluctant Shrek that he’s the heir apparent, unless he wants to recruit instead Fiona’s cousin Arthur (Justin Timberlake). So off he goes to find the boy, accompanied by his buddies Donkey (Eddie Murphy) and Puss in Boots (Antonio Banderas). And they find the kid, a sweetly dorky type, at a high school—which allows for a badly judged sequence in which the students—mean girls and bully boys—act like twenty-first century campus types in “medieval” garb—and persuade him to accept the crown, until (in an especially flat scene) Donkey and Puss make the mistake of pointing out the drawbacks.

This leads to a shipwreck in both the literal and figurative senses as the little band stumbles upon Merlin (Eric Idle), Artie’s former magic teacher, a doddering recluse whose help they need to get back to Far Far Away, which—they’ve learned—has been taken over by Charming and his band of storybook villains. (Of course, the kooky old guy makes one mistake, exchanging Puss and Donkey’s bodies in an especially lame bit.) When they do get back, they’re all captured, but change the minds of the villains in the course of a musical Charming insists on mounting to showcase his triumph (an obvious gibe at the Disney Broadway machine, which might have been a hoot if it were done with some wit, which is sadly lacking) when Artie solemnly teaches them the lesson he’s learned from Shrek—that it doesn’t matter how other people see you, as long as you’re true to yourself and your dreams. (Yawn.)

Intermingled with this “political” plot is a “domestic” one, in which Shrek must overcome his misgivings over Fiona’s pregnancy. (He’s worried that he won’t make a good dad, and feels a certain discomfort at the very idea of babies.) Frankly this whole parenthood thread does little for the picture except to allow for lots of shots of ogre toddlers in Shrek-dream sequences, guaranteed to make many in the audience go “Awww!,” and an opportunity for repeated use of the word “poop” and equally repeated throwing-up scenes. Maybe these devices are obligatory in today’s “family” movies, but that doesn’t make them any less tiresome.

Along the way, of course, the five writers toss in some sharp one-liners, but they’re far less numerous than in previous installments, and the more saccharine moments really slow things down. And despite the efforts of Murphy and Banderas to egg things on, the energy level overall seems down as well—something that’s probably not due simply to the talented vocal cast but to the direction by Chris Miller and Raman Hui. The animation is fine, though as usual the character movement lacks the ideal smoothness and facial expression isn’t a strong suit. More problematic is the choice of pop tunes that turn up periodically to appeal to the parents who’ll be bringing their kids to the movie. They’re intrusive in an elbow-in-the-ribs way, and the frog chorus doing “Live and Let Die” at the king’s funeral isn’t just a poor idea, but can’t hold a candle to the singing slugs of “Flushed Away.”

Speaking of the kids, you have to wonder whether they’ll take all that much to “Shrek the Third,” except in a dutiful fashion. Overall the picture seems more geared than earlier installments to their moms and dads; the balance of jokes, in terms of age levels, is less adroit this time around.

But that can be said of the movie as a whole. Shrek has always been a lumbering, heavy-footed fellow, but his first two movies were a lot more nimble than this one.