Jack Dylan Grazer and Zachary Levi star in a scene from the movie “Shazam.” (CNS photo/Warner Bros.)

NEW YORK (CNS) — Family life is exalted over egotistical self-reliance in “Shazam!” (Warner Bros.), director David F. Sandberg’s DC Comics-based origin story.

Though there’s a warm tone to the proceedings overall, screenwriter Henry Gayden’s script dabbles in a bit of dodgy humor about teen mischief that makes the film questionable fare even for older adolescents.

An ancient wizard (Djimon Hounsou) has been battling demons who take the form of the seven deadly sins for centuries. But, with his powers waning, he searches for a successor whose principal qualification must be absolute purity of heart. Cynics in the audience will not be surprised that he comes up short.

[hotblock]

After Dr. Sivana (Mark Strong), who was rejected as a candidate in childhood, returns to the magus’ otherworldly realm and allows the fiends to inhabit his body — and thus wreak havoc on Earth — things reach a crisis. Desperate, the sorcerer more or less randomly invites 14-year-old foster child Billy Batson (Asher Angel) to take on his abilities.

The result is that, by dint of the titular exclamation, Billy can transform himself at will into a superhero with the body of an adult (Zachary Levi). Somewhat confusingly, besides being a magic formula, Shazam is also both the wizard’s name and that of Billy’s new alter ego.

Back on Earth, Dr. Sivana is determined to force Billy to surrender his powers to him. So he targets Billy’s adoptive family, including his physically challenged foster brother — and would-be best friend — Freddie (Jack Dylan Grazer).

“Shazam!” eventually becomes almost exclusively an action picture with Dr. Sivana and Shazam, both of whom can fly, drubbing the tar out of each other in long battles in midair. Earlier on, though there’s an enjoyable overlay of comedy as Billy and Freddie marvel at Shazam’s ability to shoot electricity from his hands and perform similar nifty stunts.

It takes time for the initially selfish Billy to learn to use his gifts responsibly. It also takes some effort for him to overcome the emotional scarring that has left him with an instinct to push people away.

[tower]

As Billy learns his life lessons, viewers of faith will appreciate brief scenes of prayer and an implicitly pro-life message about the dignity of the disabled. Freddie, they’ll discover, serves both as the movie’s moral compass and, in a certain sense, as its real hero.

Interludes that find Billy using his grown-up guise to purchase beer for himself and Freddie and to visit a strip club register in a different key, however. Both lads do spit their first sip of beer out in disgust and wind up drinking soda instead. And the burlesque house is only shown from the outside. Parents, nonetheless, may wish these moments had been left on the cutting room floor.

Even so, “Shazam!” (Warner Bros.) mostly has its heart in the right place and has more to offer than many movies that take their inspiration from the comics. Above average entertainment for a broad swath of grown-ups.

The film contains much stylized violence with a few gruesome sights, underage drinking, brief sexual humor, some of it involving a strip club, at least one use of profanity and a milder oath and about a dozen crude and crass terms. The Catholic News Service classification is A-III — adults. The Motion Picture Association of America rating is PG-13 — parents strongly cautioned. Some material may be inappropriate for children under 13.