Walt Disney Co. (NYSE: DIS), the world's largest entertainment company, reported that its second-quarter profit rose 21 percent, topping analysts' forecasts as solid results from theme parks offset a disappointing performance from its sci-fi film John Carter. 

The results exceeded most analysts' estimates, sending shares of Disney up 1.35 percent, or 60 cents, to $44.90 in Tuesday's after-hours trading.

Net income increased to $1.14 billion, or 63 cents a share, from $942 million, or 49 cents, a year ago, Disney said in a statement. Excluding items, the entertainment conglomerate said it would have earned 58 cents a share, beating the 55-cent average estimate of analysts polled by Bloomberg.

We're incredibly optimistic about our future, given the strength of our core brands, Disney, Pixar, Marvel, ESPN and ABC, and our extraordinary ability to grow franchises across our businesses, such as The Avengers, which shattered domestic box office records with a $207.1 million opening weekend for a global performance of more than $702 million to date, Robert Iger, chairman and chief executive officer, said in a statement.

For the quarter, the company's studio division posted a loss of $84 million due primarily to lower worldwide theatrical results reflecting the performance of John Carter, along with the related $200 million film cost write-down.

The Burbank, Calif.-based company said ESPN and its namesake cable network saw revenue rise 12 percent to $3.1 billion, as higher affiliate and advertising revenue partially offset higher programming and production costs.

Meanwhile, profits in the theme-park division jumped 53 percent, rising to $222 million from $145 million last year.

Sales rose 6.1 percent to $9.63 billion in the period ended March 31, beating analysts' forecast of $9.56 billion.