Updated from 5:05 p.m. EDT

SAN FRANCISCO -- Video-game publisher Electronic Arts ( ERTS) beat Wall Street's earnings estimates for the second quarter and guided in line with analyst expectations for the holiday season.

The company swung to a loss of $195 million for the quarter, compared to net income of $22 million a year earlier, because of an accounting change in the way it recognizes revenue from its online packaged games business

Excluding charges, the company earned 27 cents a share. Analysts polled by Thomson Financial were expecting earnings of 20 cents a share.

Revenue was down 18% to $640 million from $784 million a year ago, driven by a $296 million increase in deferred revenue from the previous quarter. Revenue, excluding the deferral, was $936 million, up 19% or $152 million from a year ago. Analysts were expecting revenue of $896.16 billion.

Beginning fiscal 2008, EA said it will no longer charge for certain online packaged games. As a result, in the second quarter the company said it has seen a $296 million net increase from the previous quarter in its deferred net revenue, which will be recognized in future periods.

Shares of EA were up $2.57, or 4.3%, to $61.31 in recent after-hours trading.

For the third quarter, EA expects to report revenue in the range of $1.32 billion and $1.57 billion. Excluding charges, the company guided earnings in the range of 75 cents to 95 cents a share.

Net revenue, excluding the impact of the change in deferred revenue, is expected to be between $1.63 billion and $1.8 billion. Analysts were expecting net revenue of $1.61 billion and earnings of 94 cents a share.

For the fiscal year, EA expects net revenue, excluding the deferred revenue impact, of $3.8 billion to $4 billion. Analysts were expecting revenue of $3.76 billion.

Excluding charges, the company expects earnings between 85 cents and $1.15 a share. Analysts were expecting earnings of 94 cents a share.

EA's Madden NFL 08 game was its best seller during the second quarter and sold 4.5 million copies. The total number of Madden games sold were down from a year ago, but revenue remained stable because of higher pricing for the title this year, said EA. The NCAA Football game sold 1.7 million copies across four platforms while the Tiger Woods PGA Tour title sold 1.6 million copies.

EA generated $130 million in revenue, excluding deferred revenue, on games for the Nintendo systems. Revenue from its online products grew 58% from a year ago to $42 million.

Excluding deferrals, revenue from consoles such as Microsoft's ( MSFT) Xbox 360 and Sony's ( SNE) PlayStation 3 grew 20% to $618 million.

More from Technology

Listen: Will Smart Technologies Woo Millennials Back to Motorcycle Riding?

Listen: Will Smart Technologies Woo Millennials Back to Motorcycle Riding?

Pegasystems Founder Explains Why He Has One of the Hottest Tech Stocks Around

Pegasystems Founder Explains Why He Has One of the Hottest Tech Stocks Around

Tesla's $78,000 Model 3 Is a Bargain. Here's Why

Tesla's $78,000 Model 3 Is a Bargain. Here's Why

Tesla Model 3 Delivery Time Falls, but Will It Help the Stock?

Tesla Model 3 Delivery Time Falls, but Will It Help the Stock?

Baidu Stock Plummets After COO Qi Lu Resignation

Baidu Stock Plummets After COO Qi Lu Resignation