(Reuters) - Mattel Inc (>> Mattel, Inc.) reported a higher-than-expected quarterly profit on Tuesday as the world's largest toymaker kept a tight lid on costs to offset weak global demand and a strong dollar.

The results from a seasonally weak quarter, when the company also faced tough sales comparisons, cheered many investors, who pushed Mattel shares up more than 6 percent.

The news also comes as toy companies gear up for the all-important holiday selling season, when many of them make more than a third of their sales.

Mattel, home to brands such as Barbie, Hot Wheels and Fisher-Price, said its second-quarter net income had risen to $96.2 million, or 28 cents a share, from $80.5 million, or 23 cents a share, a year earlier. Analysts on average were expecting a profit of 21 cents a share, according to Thomson Reuters I/B/E/S.

Sales were flat at $1.16 billion, while analysts expected $1.13 billion. The results suffered from the stronger dollar, which brings down the value of exported goods by U.S. companies.

Mattel partly offset the effect of unfavorable currency exchange rates by spending less on making and advertising its products.

"They have done a good job with their Operational Excellence 2.0 Program to evaluate their overall business, cut expenses where possible, said MKM Partners analyst Eric Handler, who has a "neutral" rating on Mattel stock. "They are on track to save about $175 million over a two-year period."

Wells Fargo analyst Timothy Conder said Mattel had had a "strong quarter from virtually every perspective" and recommended investors continue to buy its shares.

Jakks Pacific Inc (>> JAKKS Pacific, Inc.), a smaller rival that makes toys under labels such as Pokemon and Hello Kitty, was less successful in managing costs. Its second-quarter earnings missed analysts' estimates and prompted the company to issue a weaker-than-expected outlook for the year.

Hasbro Inc (>> Hasbro, Inc.), the No. 2 U.S. toy company, is due to report its results next week.

Mattel has found it hard to replicate the success of last year's "Cars 2" movie-themed toy line with its newer playthings tied to "Brave" and the latest Batman movie, analysts have said.

Worldwide gross sales for the entertainment business were down 36 percent, mainly on decreases in the "Cars 2" merchandise. Barbie sales were up 5 percent.

Mattel sells toys through retailers such as Wal-Mart Stores Inc (>> Wal-Mart Stores, Inc.), Toys R Us Inc , and Target Corp (>> Target Corporation) as well as through its own catalog and website.

Also on Tuesday, Mattel's board set a third-quarter cash dividend of 31 cents a share, continuing to keep the annual payout at $1.24.

Shares of Mattel were up 6.3 percent at $33.00 in trading before the market opened.

(Reporting by Dhanya Skariachan in New York; Editing by Lisa Von Ahn)

By Dhanya Skariachan