Sony Pictures Entertainment and toymaker Mattel Inc. on Wednesday announced a deal to bring the El Segundo toymaker's Barbie doll to life in a comedy film.

Mattel is working with Sony on films based on its “He-Man and the Masters of the Universe” action figures. Barbie already has been the subject of several animated films but this will be a live-action film. Mattel and Sony will use a script written by Jenny Bicks, who co-wrote the animated “Rio 2.″ Walter Parkes and Laurie MacDonald will serve as producers on the project. Julia Pistor will executive produce as part of Mattel's Playground Productions.

"Barbie has entertained children and inspired their imagination and creativity for more than 50 years," Tim Kilpin, Mattel executive vice president of Global Brands, said in a statement. "Now is the right time in Barbie's celebrated history for her to star in a live-action, contemporary comedy that brings her playful personality to life for generations of fans.”

Mattel has been looking for new ways to invigorate its flagship franchise. The company last week reported its first quarterly loss in five years, blaming it on weaker Barbie sales and excess inventory marked down due to a lackluster holiday season.