'The Amazing Spider-Man 2' (PG-13)

You have to be patient before The Amazing Spider-Man 2 starts to pay off. First comes a lot of unnecessary backstory. Who cares what happened to Peter Parker’s parents anyway? A few lines of dialogue would have been sufficient. In an attempt to invest us emotionally in his characters, director Marc Webb takes his time — 142 minutes — and indulges in scenes that cry out to be trimmed. If Electro is going to be such a faceless, generic villain, why spend so much time with his nerdy alter-ego (a miscast Jamie Foxx)?

There are scenes in this sometimes clunky, unwieldy movie, written by the Lost/Alias team of Alex Kurtzman, Roberto Orci and Jeff Pinkner, that give the picture a stitched-together feel, and the seams show. But even though the ride is bumpy, the final destination is more than worth the effort. Once again, Webb’s primary focus is the sweet romance between Peter (Andrew Garfield) and the teenage dream Gwen Stacy (Emma Stone). As the film opens, they’re graduating from high school and planning for college, but Peter feels bound to the promise he made to Gwen’s father (Denis Leary, seen in flashbacks) to stay away from her for her own safety. Gwen doesn’t understand why her super-boyfriend keeps pulling away, so she decides to apply at Oxford and study abroad.

In almost any other comic-book movie, this sort of development would be insufferable, the stuff you have to sit through before the film gets good. But the heart of The Amazing Spider-Man 2, just like the previous film, is the bond between Peter and Gwen, and now that the actors have become a real-life couple since making the first picture, their chemistry is even stronger and more natural now. In one scene, when Peter complains about having to hide in a broom closet, Gwen snaps back, “I’m sorry I didn’t take you to the Bahamas of hiding places,” and the line feels funny and real, almost improvised.

Even if you took away all the superhero stuff, you’d watch these two in anything.

That’s why The Amazing Spider-Man 2 grows stronger and more engrossing as it unfolds. The moody Harry Osborn (Dane DeHaan) has inherited his late father’s fortune, as well as the disease that turned him into a goblin. The kid walks around with dagger eyes and a perpetual scowl and doesn’t trust a soul. But he lets his guard down when Peter comes to visit, and the scenes in which the two old friends reconnect show you a glimpse of how close they once were — and makes you dread what’s coming even more.

Most comic-book movies follow a template of increasingly bigger setpieces as they unfold. The Amazing Spider-Man 2 is different. It doesn’t have quite that many big sequences, but the ones you do get are long and elaborate and immensely satisfying. Webb knows how to frame the action so it comes into the frame instead of chasing his camera after it, which allows you to follow what’s happening clearly and reminds you of comic-book panels (he does send the camera swooping, to vertiginous effect, when Spider-Man is swinging through the canyons of New York City; once again, this one is worth the IMAX 3D).

The movie also isn’t afraid to test its hero in a way few movies of this genre dare to do. Garfield, like Peter, seems more confident and in control, but he is also vulnerable and emotional at times, helping to remind you that the character is just a teenager trying to survive adolescence. The Amazing Spider-Man 2 has that gloomy, open-ended feel of the second chapter of a trilogy (a shot near the end hints at what’s coming next), and even if the movie is too long for its own good, the filmmakers take some huge chances that are commendable. Not all of them work, but the ones that do strike deep. This is a rare sort of pop entertainment — a cartoonish movie with heart.

Cast: Andrew Garfield, Emma Stone, Jamie Foxx, Dane DeHaan, Sally Field, Campbell Scott, Embeth Davidtz, Paul Giamatti.
Marc Webb.
Screenwriters: Alex Kurtzman, Roberto Orci, Jeff Pinkner.
A Columbia Pictures release. Running time: 142 minutes. Violence, some adult themes. Playing at area theaters.