Disney’s fiftieth animated feature, according to the studio’s count, turns out to be its best non-Pixar effort since the second “Golden Age” of 1989-92—the time of “The Little Mermaid,” “Beauty and the Beast” and “Aladdin.” (The decline set in with “The Lion King,” despite that sappy movie’s enormous success in 1994, and has continued down to the present, with a few exceptions like “Tarzan” in 1999.) Actually the revisionist take on the old Rapunzel fairytale plays like an amalgam of “Mermaid” and “Aladdin,” involving an enchanted princess and a handsome rogue who becomes her romantic interest. And it too boasts a score by Alan Menken (working this time with lyricist Glenn Slater) that doesn’t match the ones he wrote for the earlier pictures with Howard Ashman, but could still serve in a future Broadway incarnation.

The first half of “Tangled,” as the movie is rather unimaginatively titled, also has a Shrekian feel in its jokey, stand-up comedy take on the story; but that becomes less pronounced as the tale proceeds, with the second half going more for sentiment and tears. After the infant princess is kidnapped by the old crone Gothel (voiced by Donna Murphy) because the child’s magical hair can keep her young, the renamed Rapunzel (Mandy Moore) is kept in the forbidden tower hidden away deep in the forest, ostensibly to protect her from the dangers that lurk outside. Her only companion, apart from Gothel (who pretends to be her mother), is a cute but protective chameleon that can change color at will and possesses an alarming range of facial expressions. Still Rapunzel dreams of escaping the tower to see up close the slew of candle lanterns that her real parents release into the sky every year to call her home.

Into the compound housing the tower stumbles Flynn Rider (Zachery Levi), a cocky young thief who’s just liberated the princess’ lonely crown from the castle and ditched his two muscle-bound comrades in crime, who are in hot pursuit of their erstwhile partner and the satchel in which the tiara’s being carried. Flynn’s also being chased by the royal guards, whose captain is separated from his horse Maximus, which continues the pursuit on its own, dedicated as it is to the capture of wrongdoers.

Flynn sees safety in the tower, but Rapunzel takes him prisoner and will release him only if he pledges to take her to the lantern show. The rest of the film is largely a long chase in which the duo, along with that darling and mistrustful chameleon, must make their way to the castle while dealing with Flynn’s erstwhile partners, the persistent Maximus, and the manipulative Gothel. Add to the mix a slew of forest ruffians whom they encounter in a sleazy inn (and who provide the big production number, this film’s “Under the Sea”), lots of slapstick and derring-do, and you’ve got a fine, funny complement to the inevitable bond that builds between the initially bickering couple by the time they reach the kingdom to which Rapunzel is the actual heir.

There are plenty of good laughs—and quite a few intentional groaners—along the way to the last act, which contains not only a lovely musical number given visual punch by that sea of flying lanterns, but a resolution that actually carries surprising emotional punch, involving as it does self-sacrifice as well as a hair’s-breadth escape.

Almost everything works in “Tangled.” The hero is an ingratiating fellow, as Aladdin was, and if Rapunzel doesn’t have the spunk of Ariel, by the end her relative blandness is less a problem than it might seem. That’s because Gothel is a solid Machiavellian villainess (complete with a solo that would stop the show if movies stopped for applause), the supporting human characters are well fashioned (especially that band of forest not-so-meanies), and the obligatory animal characters—Maximus and the chameleon—good fun. (The horse, to be sure, is given the characteristics of a big dog, but the confusion-of-species operation works.) The vocal acting is fine, too, with Levi the standout even if he doesn’t get much chance to sing. And the CGI animation is superb, though the 3D—while effectively employed—unfortunately reduces the brightness of the images and reduces their clarity.

There will undoubtedly be those who complain that “Tangled” has been cobbled together from bits and pieces of earlier Disney animated films. They’re right. But that can be said of virtually every animated movie ever made. The important thing is that though the materials may be recycled, the carpentry is better than it’s been at the Mouse House in nearly twenty years.