Running a toy company these days is no game. While toy sales hold up well during recessions -- no parent wants to suggest a no-gifts birthday party -- the industry hasn't been immune from slowing revenue this time around. Which is why it's encouraging to hear good news from Mattel ( MAT) and Hasbro ( HAS), the No. 1 and 2 American toy companies, respectively. This week, each reported higher-than-expected quarterly profits, bringing much-needed optimism to the sector. No matter what the age of your target consumer, you can learn something from these companies' survival strategies. In the short term, make the best of what you've got by paring costs and focusing on a few key products. At the same time, you've got to lay the groundwork for future growth or risk getting left behind. This should have been a banner year for Mattel and Hasbro. Mattel's iconic Barbie doll turned 50, kicking off a wave of publicity. This spring, the company opened a six-floor flagship Barbie store in Shanghai, where shoppers can pick up doll-sized Vera Wang wedding gowns, catch a live fashion show and design their own custom doll. Hasbro, for its part, expected its Transformers toys to get a major boost from the movie "Transformers: Revenge of the Fallen," one of the year's biggest blockbusters. But penny-pinching customers have taken a toll on overall sales for both companies. According to Sean McGowan, a consumer leisure and lifestyle analyst at Needham & Co., last year's holiday season was the worst for toy sales in 40 years. "The companies that did well were the ones who took away their promotional budgets and used that to cut prices. If you weren't offering value, people weren't buying."