Summer box office totals set a record with help from 'Iron Man 3,' 'Despicable Me 2.' Here are five things learned from the results.

"R.I.P.D." was D.O.A. and "The Lone Ranger" was unable to lasso moviegoers. Yet at summer's end, Hollywood is riding happily off into the sunset thanks to an unexpected number of $100-million-plus hits that drove the seasonal box office to a record.

Total box office revenue in the U.S. and Canada for the May 2-Labor Day period climbed 10.2% over last year to a record $4.7 billion, while attendance rose 6.5% to roughly 572 million, according to Hollywood.com. The average ticket price also hit a new high of $8.23.

The strong business was needed: Heading into the summer, ticket sales were down about 12% compared with the same period in 2012. Four months later, the box office is now about even with last year.

While the season is ending on a positive note, there were certainly plenty of high-profile tales of woe this summer: Sony Pictures' "After Earth" and "White House Down," Walt Disney Studios' "The Lone Ranger" and Universal Pictures' "R.I.P.D." — each of which cost well over $100 million to produce — all flopped in spectacular fashion. But at least 17 movies crossed the $100-million milestone this summer — five more than in summer 2012.

The six highest-grossing films this summer were sequels, prequels or reboots. A few original titles did crack the top 10, however, including the Sandra Bullock-Melissa McCarthy buddy-cop comedy "The Heat" and the low-budget horror flick "The Conjuring."

Like last summer, the top earner came from Disney-owned Marvel Entertainment. "Iron Man 3," starring Robert Downey Jr., grossed over $400 million domestically and more than $800 million internationally. Its $1.2 billion global tally is slightly below that of "The Avengers," which ruled the season a year ago with an astounding $1.5-billion haul.

That superheroes triumphed at the multiplex yet again may not be surprising, but there were at least five other more subtle lessons from the summer movie season:

1. Yes, you can have too many cartoons

Six computer-animated films were released this season — two more than in summer 2012 — but only one was a massive hit: "Despicable Me 2," which has raked in $820 million worldwide since its July 3 debut. The film about bouncing yellow Minions from Universal's Illumination Entertainment overpowered the competition, including DreamWorks Animation's "Turbo." That tale of a racing snail came out two weeks after "Despicable Me 2" and has grossed just under $80 million domestically — the second-worst performance ever for a film from Jeffrey Katzenberg's studio.

"The Smurfs 2," which opened at the end of July, proved similarly disappointing. Because the first "Smurfs" made $563 million worldwide in 2011, Sony Pictures expected the sequel to improve upon that figure. But so far, the second film has collected less than half that, and only $67 million domestically.

As for Disney, its Pixar Animation release "Monsters University" got a jump on "Despicable," hitting theaters in June and ending up a hit with over $700 million in global sales. The studio's "Planes," meanwhile, has been far less successful since its August debut with just over $100 million worldwide — but the film only had a budget of $50 million because it was initially slated to go direct-to-DVD.

The possible takeaway here? Sure, kids are out of school, but families may not want a new animated film every two weeks. Which brings us to:

2. Be creative with the calendar

The colder months have traditionally been home to horror films, but Universal decided to open "The Purge" in June, and Warner Bros. followed a month later with "The Conjuring" — each of which played to enthusiastic crowds. "The Conjuring," made for $20 million, was especially profitable, grossing $133 million stateside.

Counterprogramming also paid off for Lionsgate, whose Summit Entertainment launched its stand-up comedy film "Kevin Hart: Let Me Explain" over the July 4 holiday against "The Lone Ranger" and "Despicable Me 2." Playing in no more than 900 theaters, the movie went on to gross $32 million — a win for a film with a $2.5-million budget.

Early summer, meanwhile, is becoming a hotter blockbuster breeding ground. Many of the season's biggest films were released not in July — which has long been thought of as the ideal launching pad for a potential smash — but in May. This year, four of the summer's top 10 films opened in May, versus just two last summer.

3. Doppelgangers were doomed

Yes, audiences have yet to tire of most sequels and remakes. But if your movie resembles another one too closely, it can spell disaster. That may have been the problem with "White House Down," released in July, in which an aspiring Secret Service agent helps protect the president as 1600 Pennsylvania Avenue comes under terrorist attack.