(Reuters) - Mattel Inc MAT.O saw a big boost in demand for its action figures after the worldwide success of the latest "Toy Story" movie while a Barbie makeover lifted sales of the iconic doll, helping it report a surprise rise in quarterly revenue.

FILE PHOTO: The Mattel company logo is seen at the 114th North American International Toy Fair in New York City, U.S., February 21, 2017. REUTERS/Stephanie Keith

The toymaker also hit its full-year cost savings target six months ahead of plan and posted a much smaller-than-expected loss, propelling its shares 5% higher on Thursday.

Mattel is hoping to ride the “Toy Story” wave and its Chief Executive Officer Ynon Kreiz told Reuters the company is working to become the “partner of choice” for more entertainment firms.

“Historically, it wasn’t an area we were focused on but going forward we are looking to do more. The success of ‘Toy Story’ is an example of our capabilities,” said Kreiz, who once headed digital media company Maker Studios.

“Toy Story 4”, which circles around a group of toys with voices from Hollywood A-listers Tom Hanks and Tim Allen, has become one of the smash hits of the year, grossing over $860 million worldwide.

Mattel's rival Hasbro Inc HAS.O earlier this week beat quarterly profit and sales estimates on demand for action toys based on "Avengers: Endgame", reflecting the industry's shift away from developing new original properties to chasing big entertainment titles to grab kids' attention.

Barbie has also seen sales revitalized in recent months from variants of the 60-year-old doll based on popular celebrities and role models such as tennis star Naomi Osaka, aviation pioneer Amelia Earhart and singer David Bowie’s alter-ego Ziggy Stardust.

Worldwide sales in the action figures, building sets and games segment jumped over 20% in the second quarter, while they rose about 9% in the Barbie unit.

The company’s total revenue rose 2.3% to $860.1 million, while analysts’ on average had estimated a 3.3% drop.

Mattel is set to get a lift from the scheduled release of play-sets based on the White Walker battle from HBO’s hit show “Game of Thrones”.

Tie-ups with big entertainment titles are essential for toy companies to keep up sales as they bring in new customers already loyal to the franchise, said James Zahn, senior editor at trade magazine “The Toy Book”.

Cost controls have been a major part of Mattel’s turnaround strategy, and the company said it exceeded its savings target for 2019. The company hit $754 million in the first six months, compared with its initial target of at least $650 million for the year.

Mattel said it expects to achieve another $100 million in savings by the end of 2019.

On an adjusted basis, Mattel reported a loss of 25 cents per share in the three months ended June 30. Analysts had expected a loss of 40 cents per share.