Neatly balancing brightly sentimental comedy with slightly edgier funny business, "The Incredible Burt Wonderstone" pulls off the impressive trick of generating laughs on a consistent basis while spinning a clever scenario about rival magicians waging a Las Vegas turf war with a wide multi-demographic appeal.

Neatly balancing brightly sentimental comedy with slightly edgier funny business, “The Incredible Burt Wonderstone” pulls off the impressive trick of generating laughs on a consistent basis while spinning a clever scenario about rival magicians waging a Las Vegas turf war with a wide multi-demographic appeal. And while it may fall short of working B.O. magic when it hits theaters March 15, the pic — which played well with the opening-night crowd at the SXSW Film Festival — could wind up generating steady biz on a long-term basis rather than pulling a quick vanishing act.

Steve Carell and Steve Buscemi are well cast as Burt Wonderstone and Anton Marvelton, childhood friends (and fellow nerd outcasts) who grew up to be superstar magicians with their own permanent performance place inside a glitzy Las Vegas casino.

Unfortunately, success long ago went to Burt’s amply hairsprayed head. He and Anton routinely don their spangly costumes, strike their practiced poses, trade their well-worn wisecracks and rotely go through the motions during an act that obviously hasn’t changed much in a decade or so. (Their apt onstage theme, Steve Miller’s “Abracadabra,” becomes an amusing running gag simply through endless repetition.)

But despite Anton’s suggestion that they refresh their bag of tricks, Burt is far more interested in bedding groupies — using a meticulously detailed m.o. (including demands for proof of age and a signed release form) revealed in one of the pic’s most inspired sequences — than doing anything that hasn’t already worked with audiences.

Their complacency leaves room for a snarky street magician/endurance artist named Steve Gray (think Criss Angel, but with more attitude than talent) to siphon off their audience with self-aggrandizing stunts on and off the Vegas Strip. Hilariously played by Jim Carrey as a condescending showoff, Gray thrives on shocking people with dangerous feats (such as maiming his face and sleeping on hot coals) that Burt indignantly insists aren’t “real” magic.

Trouble is, they’re real enough to attract the interest of Doug Munny (James Gandolfini), the fabulously rich and mega-egotistic owner of the casino where Burt and Anton perform. When Munny demands that his fading stars attempt something as spectacular as Gray’s risky trickery, they do so — quite disastrously — leading to public humiliation, an acrimonious breakup and the start of Burt’s reluctant journey toward something like personal and professional rebirth.

Carell is at the top of his form as the self-absorbed Burt struggles to maintain his haughty sangfroid while trying to convince himself, and everyone else, that’s he’s still a superstar, even as he’s reduced to taking a gig as the resident act at a retirement home for Vegas performers. Fortunately, that’s where the fallen-from-grace former headliner meets a singularly irascible retiree: Rance Holloway (Alan Arkin), the same legendary magician who originally inspired Burt to pursue prestidigitation as a profession.

With a little help from Holloway — and encouragement from Jane (Olivia Wilde), a former stage assistant who proves to be pretty magical herself — Burt is ready to compete against Gray and several others in an audition for a prime gig at Munny’s latest hotel. But what he really, really needs to seal the deal is a reunion with his estranged partner — whose own journey of self-discovery shows that in some parts of the world, people have desperate need of the rabbits magicians pull out of their hats.

Former actor turned TV helmer Don Scardino does a bang-up job of unobtrusively maneuvering through stealthy tonal shifts in the free-wheeling script by Jonathan Goldstein and John Francis Daley. Some of the standout scenes border on black comedy (including the blunt-force physical gags in the pic’s final minutes), while others rely more on traditionally sunny buddy-comedy humor. But Scardino and his players ensure that there are no bumpy transitions, only a smooth ride.

Buscemi is very engaging as the amiably optimistic Anton, Wilde fleshes out a thinly written part through sheer screen presence, Gandolfini attacks his part with infectious delight, and Arkin continues his long run of show-stopping, scene-stealing supporting perfs.

“The Incredible Burt Wonderstone” boasts a brightly buffed technical polish. The trademark trick in Burt and Anton’s act is a stunt partly designed by real-life magician David Copperfield, who appears as himself in a witty in-jokey sequence. Golden oldies and new tunes are efficiently employed in the mood-enhancing soundtrack. Expect to be humming “Abracadabra” for days afterward, whether you want to or not.