The old age switcheroo is employed once more in this highly derivative but still moderately enjoyable comedy starring teen heartthrob Zac Efron. He plays Mike O’Donnell, who, in a prologue set in 1989, is a high school basketball star on the verge of getting a college scholarship. But just before the big game is to start, he learns that his sweetheart Scarlet (Allison Miller) is pregnant, and tosses his plans aside to marry her.

Eighteen years later, Mike’s turned into Matthew Perry—a truly tragic turn of events. Even worse, Scarlet (now Leslie Mann) is divorcing him, and his kids Maggie (Michelle Trachtenberg) and Alex (Sterling Knight) are as distant as can be. When he’s denied an expected promotion at work, he revisits his old high school dreaming of what might have been, and a janitor-angel zaps him back to age seventeen, but in the present. He has a second chance.

But of course things don’t go exactly as planned. He has the nerdy best friend with whom he’s been crashing—rich software dork Ned Gold (Thomas Lennon) claim him as a long-lost son and enroll him in the old high school again, with the intention of making a new and better future for himself. But of course his goals turn from self to his family. He helps Maggie break up with her surly brute of a boyfriend Stan (Hunter Parrish) and Alex, the class doormat, make the team and get a girl. And of course he learns that he still loves Scarlet and wants to win her back. Guess what happens when he’s faced once again with the same choice he had nearly two decades ago, at yet another final basketball game?

It would be a tedious business to catalogue all the earlier movies to which Jason Fildardi’s script is indebted—everything from “It’s a Wonderful Life” and “Big” and “Back to the Future” to “Vice Versa” and “Like Father Like Son” and “Peggy Sue Got Married” and “Blast from the Past.” But it’s not the borrowings that are problematic—nor the messages that are periodically inserted—it’s the sloppy way they’re tossed together. It’s good that the essential absurdity of the premise gets the sly post-modern treatment it warrants in the offhanded remark by dorky Ned that this sort of thing is just a staple of the fantasy genre, but then the script tries stressfully to find some way to shoehorn into the narrative virtually every familiar twist and complication of the formula, and the result is too often simply ungainly (and, on a couple of occasions, borderline creepy). One gets the sense that had another draft or two been allowed, it might have turned out a smoother affair.

But there’s still some pleasure to be had here, mostly because of Efron, who’s easily the best reason to see the picture. He has a basketball court dance number upfront that will satisfy all the “High School Musical” fans, but that’s hardly all he has to offer. He proves himself once more a really charismatic screen presence, handling both the physical comedy and the detours into sentiment and near-drama with as much finesse as his brings to the sports action, which is considerable. This may be more a baby-step move than a real stretch for him, but he pretty much carries things, and does so with assurance.

He gets some help from the capable Leslie Mann as the grown-up and increasingly confused Scarlet, and from Trachtenberg and Knight as the kids in need of guidance from a father, even if it’s one in a seventeen-year old’s body. But entirely too much time is given over to Ned and his pursuit of school principal Jane Masterson (Melora Hardin); Lennon’s shtick as the boy who never grows up gets old faster than the transformed Mike does, and the descent into Tolkien territory between him and his quarry has a pandering tone. Even worse is the subplot involving Maggie’s romance with thuggish Stan, played dully by Parrish (the ending of which takes us into one of those slightly creepy place), as well as the sitcom stuff early on with Perry, whose reappearance at the close is mercifully brief. The inconsistency is the fault not merely of the script, but of the direction of Burr Steers (“Igby Goes Down”). So long as Efron is at center stage, his unsteadiness of hand is trumped by the talent of the star; but elsewhere it casts a pall over the proceedings.

Technically “17 Again” is okay, but neither Garreth Stover’s production design nor Tim Suhrstedt’s widescreen cinematography is anything special, and Rolfe Kent’s score (working with Buck Damon’s “music supervision”—read choice of pop inserts) doesn’t provide the period punch the material would ideally invite. But the closing credits, which use the yearbook photos of crew and cast members, add an amusing touch.

The upshot is a movie that’s agreeable enough because of its star, but otherwise only average.