(Reuters) – Walt Disney Cos theme parks lifted quarterly earnings past Wall Street targets on Wednesday, helping offset big investments to support the media and entertainment companys bid to draw audiences to streaming media.

Shares of Disney rose 1.5 percent to $137 in after-hours trading.

Avengers: Endgame, the end of a decade-long superhero series with $2.2 billion in box office sales worldwide, will stream exclusively on Disney+ starting Dec. 11, the company announced.

Growth at Disney parks in the United States boosted results above analyst expectations. From January to March, Disney reported adjusted earnings per share of $1.61, ahead of analyst estimates of $1.58, according to IBES data from Refinitiv. Heavy investment accounted for a 13 percent drop from a year ago by that measure.

Revenue rose 3 percent to $14.92 billion. Analysts had been expecting a small decline.

Disney is trying to transform from a cable TV leader to a streaming media powerhouse that, like Netflix Inc, sells subscriptions directly to consumers. Costs to build digital services will weigh on profits for several years, the company has said, but the stock has risen 15% since the Disney+ announcement in April.

Its biggest streaming bet, the family-oriented Disney+, is set to launch in November. The company told analysts in April that it expects Disney+ to achieve profitability in fiscal 2024.

The just-ended quarter reflected the purchase of film and TV assets from 21st Century Fox, which brought Disney more content for its streaming future.

For the quarter, the direct-to-consumer and international unit recorded a loss of $393 million from streaming costs.

Disney also recorded a $353 million impairment charge from its ownership stake in media startup Vice.

In the theme park unit, net income hit $1.5 billion as more visitors showed up at Walt Disney World in Florida and at Hong Kong Disneyland, and occupied hotel nights increased.

Increased ticket prices havent put visitors off, and hotels continue to be a major driver of additional spending, said Nicholas Hyett, equity analyst at Hargreaves Lansdown. Its easy to get caught up in the hype surrounding new films … but its the less glamorous Media Networks and Parks that pay the lions share of the bills.

Overall net income jumped 85 percent, to $5.4 billion, thanks to Disneys acquisition of a controlling stake in Hulu through the Fox acquisition.

Media networks, a division that includes ESPN and ABC, reported $2.2 billion in operating income for the quarter.

The movie studio reported profit of $534 million, lifted by Captain Marvel, which was a global hit but did not reach the level of Black Panther and Star Wars: The Last Jedi a year earlier.

Reporting by Lisa Richwine in Los Angeles and Vibhuti Sharma in Bengaluru; Editing by Anil DSilva and Lisa Shumaker

All quotes delayed a minimum of 15 minutes. Seehere for a complete listof exchanges and delays.