There’s a musty, stagebound feeling to “Magic in the Moonlight,” like a Bernard Shaw play from his dotage, when he knew he was turning out weak stuff but couldn’t stop writing. The story, set in 1928, hangs on a slight thread. Stanley (Colin Firth) an English stage magician and debunker of fake spiritualists, is summoned to expose Sophie (Emma Stone), an American spirit medium working the French Riviera.

So convincing is Sophie’s legerdemain that she has an American steel tycoon’s widow (Jacki Weaver) believing that she can reach her late husband in the Great Beyond. Equally convinced and grateful is the dowager’s ukulele-strumming son, (Hamish Linklater), who has asked for the lovely girl’s hand in marriage.

Stanley, a stern rationalist who has exposed frauds “from the seance table to the Vatican and beyond,” enjoys snatching away the thin comfort blanket of spiritualism, forcing mystics’ clients to face the cold reality of brief life and irreversible death. He accepts the challenge to debunk Sophie with cocksure determination. His certainty is undimmed when Sophie claims “mental vibrations” that reveal facts about him she could not independently know.

Shrewd deduction and lucky guesses, Stanley snaps. But the girl’s romantic spell is not so easy to resist. As the reserved Englishman finds himself ever more infatuated, he’s forced to face mounting evidence that Sophie is the miracle worker she claims to be. She offers Stanley, described by another character as “obsessed with mortality … believes in nothing … a very unhappy man,” the dream of a world where things could be otherwise.

Writer/director Woody Allen, following his powerful “Blue Jasmine,” aims for period whimsy here, but the effort sinks like a punctured rubber duck. The screenplay must be the wordiest thing Allen has ever written — oh, the heaps and piles of dialogue — yet there’s little of his trademark verbal playfulness. He can’t make these antique characters talk like wisecracking New Yorkers, obviously, but dry, epigrammatic Edwardian speech fouls up Allen’s comedic rhythms.

Firth is in full repressed gentleman mode. He is so cool there is snow on his upper slopes. He has made stoicism sexy before but here he’s playing a real dry crumpet. Though he’s well along in years, his strongest emotional attachment is to his formidable aunt (Eileen Atkins), and he’s devoid of sweet talk around the dazzling Sophie. She’s about raising hopes and he’s about crushing them. He woos her in bloodlessly rational terms, describing the calm, pleasant routine she will have around a man of genius such as himself.

There is a bright ray of magic in the moonlight, however. Stone is captivating as the dubious seer, widening those searchlight eyes as she receives spirit communiqués, and flirting deliciously with the flinty Firth. She brings to her role the joy and innocence of youth, with just enough undertone of flimflam to make things interesting. She also looks radiant in the French coastal sunlight and ’20s gowns.

In fact, the costumes, vintage decor and Great Gatsby luxury of the production are impressive all around. You may have memorized jokes from Allen’s other films. This one will have you quoting the scenery.