Combine familiar comic book figures with the memorable time-warp premise of 1993’s “Groundhog Day,” and you’ve got the delightful direct-to-video feature “Lego DC Comics Super Heroes: The Flash” (Warner Brothers Home Entertainment).

The movie, which is suitable for all, teaches strong moral lessons about self-sacrifice, personal responsibility, the value of science and the need to be conscious of what’s going on around you.

“The Flash” begins with what must be the most overused trope in the comic book universe: a battle between Batman (voice of Troy Baker) and the Joker (voice of Jason Spisak). This time, however, the fight takes place in Metropolis, Superman’s gleaming home town.

Ever since Batman started hanging out with his friends at Metropolis’ Hall of Justice, the city has been on the Joker’s list of targets. His assault takes the form of a series of deadly laughing-gas bombs.

It’s up to the Justice League — here comprised of Superman (voice of Nolan North), Wonder Woman (voice of Grey DeLisle), Cyborg (voice of Khary Payton), Plastic Man (voice of Tom Kenny), Firestorm (voice of Phil LaMarr) and new recruit the Atom (voice of Eric Bauza) — to thwart the Clown Prince of Crime.

But what’s become of the Flash (voice of James Arnold Taylor), who ought to be fighting alongside them? He accidentally set his Justice League emergency beeper on vibrate, overslept, and has spent all morning zipping around different cities getting donuts, stopping the villains Captain Cold and Captain Boomerang and tossing down a milkshake.

Flash, whose alter ego in this outing is police scientist Barry Allen, does eventually show up to dispatch the Joker. He brushes off being late but is scolded by the other heroes. “Not everything can be fixed with speed,” Batman tells him. Wonder Woman stresses the importance of always being “aware of your surroundings.”

No sooner is that advice given then Flash impulsively takes off after a mysterious speedster dressed in yellow. This turns out to be Reverse-Flash (voice of Dwight Schultz), a villain from the future who can match, and even surpass, the pace of his crime-fighting counterpart.

Lured into a time loop by the newcomer, Flash ends up reliving the same day over and over while Reverse-Flash assumes his identity in the normal world. Reverse-Flash’s motive for the switch is egotism. In a bid to be worshipped, he uses his speed to solve all the crime in Metropolis in short order, and kneecaps the efforts of the Justice League.

Sensing something is off, quick-shrinking hero and brilliant scientist the Atom seeks the help of Doctor Fate (voice of Kevin Michael Richardson). In the best sequence of the movie, Fate, who’s endowed with a Barry White-like bass-baritone, prods Flash to perform a blues number bemoaning his troubles.

With Fate’s aid, Flash embarks on a quest to escape his chronological trap and regain his powers. Throughout the varied adventures that follow, the lesson for the viewer remains the same: Even if you’re the Flash, sometimes the best course of action involves slowing down, forming a plan and taking note of your environment.

That’s a refreshing piece of wisdom in a comic book universe that gets louder and more explosive every summer season. And it may prove especially helpful to young people bombarded by an excess of distracting digital stimulation.

There’s also a nod to science, as the Atom uses his knowledge of the molecular world to disperse toxic gas and solve the challenge of bringing Flash back to the League.

In addition to its positive messages, director Ethan Spaulding’s film features beautiful animation and a fun, funny script. Some of the humor is directed at grown viewers. In Barry’s apartment, for instance, there’s a painting by Dutch modernist Piet Modrian, the clean squares and rectangles of whose characteristic style resemble Legos.

The Catholic News Service classification is A-I — general patronage. Not rated by the Motion Picture Association of America.