President Barack Obama put the klieg light on Hollywood Tuesday, crediting the motion picture and television industry for being an engine of growth and a bright spot in a recovering economy.

"Entertainment is one of the bright spots of our economy," Obama told a crowd of nearly 2,000 people gathered at the Glendale campus of DreamWorks Animation SKG. "The gap between what we can do and other countries can do is enormous. That's worth cheering about."

Obama was hosted by DreamWorks Animation Chief Executive Jeffrey Katzenberg, who is one of Obama's biggest contributors and fundraisers.

A May 2012 fundraiser hosted by Katzenberg at George Clooney's house raised nearly $15 million for the Obama campaign. And in September, Obama met Katzenberg for dinner at the Hilton Woodland Hills after an appearance the president made on “The Tonight Show With Jay Leno.”

Obama thanked Katzenberg for his support. "Jeffrey ... has been a friend and supporter through thick and thin," Obama said. "His place in the entertainment industry is legendary. I don't need to puff him up too much. He has a healthy sense of self, but he is a great friend and somebody whose counsel and advice I value and I'm incredibly grateful to be here at this wonderful institution that he helped to build."

White House Deputy Press Secretary Josh Earnest told reporters Monday that Obama chose the DreamWorks Animation site because of the studio’s track record in creating jobs, not because of Katzenberg’s fundraising. Employment at DreamWorks has risen by 50% since January 2008.

DreamWorks has generated billions in box-office revenue from its hit "Shrek," "Kung Fu Panda" and "Madagascar" movies, expanding its business in China and overseas markets and branching into television with a recent partnership with the Netflix streaming service.

Guided by Katzenberg, Obama got a lesson in how animators use motion capture to bring animated characters to life and had a funny exchange with actors Steve Martin and Jim Parsons, who were recording lines for the studio's upcoming alien-invasion film, "Home."

Obama greeted the actors in a small sound studio. He shook hands with Parsons but not Martin, who declined, explaining that he had a cold. Instead of shaking hands, the actor and the president did a little elbow bump.

"Are you going to sound a little nasal in your reading today?" the president asked Martin.

"The meeting was an opportunity to discuss the economy and highlight the entertainment industry as a bright spot in our growing economy," Earnest said. "The president discussed the impact that broader economic conditions has on the industry. He also touched on piracy and intellectual property rights, which are chief concerns of participating film industry leaders."

Obama’s visit and upbeat message about the entertainment industry, however, comes at a time of widespread anxiety among the middle-class crew members in Los Angeles who work behind the scenes on film and TV sets.

Many have seen their job opportunities and incomes dwindle as more work has migrated to other states and countries such as Canada and the U.K. that offer film productions stronger incentives and tax breaks than are available in California.

“Some indicators suggest that activity in the entertainment industry is up, but that has not translated into jobs here in California,” said Robert Kleinhenz, chief economist with the Los Angeles County Economic Development Corp. “In fact, the number of industry-related jobs locally and in California has shown little improvement since the recession, even as industry employment nationally has increased modestly over the past couple of years."

Some visual effects workers held a rally outside the studio to call attention to the plight of California's visual effects industry, which has been hard-hit by the outsourcing of jobs and layoffs.

DreamWorks, which employs 2,200 people, laid off about 350 employees earlier this year following a decision to shelve production of the movie "Me and My Shadow," but that layoff was not tied to outsourcing.

“This is not an attack on DreamWorks Animation or Obama, but we do not have jobs coming to us. They are all going to other countries,’’ said Tom Capizzi, a longtime visual effects employee of Rhythm & Hues who lost his job in February. “We need to take away these subsidies. It’s having a huge impact on the workers of Los Angeles.”

Obama visited the West to raise money for Democratic House and Senate candidates. His itinerary included two fundraisers Monday night to benefit Democrats running for Congress and the Senate.

On Monday he attended a reception at the Beverly Hills home of Earvin “Magic” Johnson, along with Rep. Nancy Pelosi (D-Calif.) and Sen. Harry Reid (D-Nev.). Israeli American billionaire Haim Saban, who is chairman of Spanish-language channel Univision Communications Inc., also hosted a dinner for the president.

On Tuesday morning, the president also attended a Democratic fundraiser at the Hancock Park home of Marta Kauffman, creator of the television show “Friends.”