It's been a tough several years for Mattel (NASDAQ:MAT). The company ceded its industry-leading position to rival Hasbro (NASDAQ:HAS), lost the lucrative Disney (NYSE:DIS) Princess and Frozen lines, and changed its CEO several times. Recent results seem to suggest Mattel may be back from the brink.

In this episode of Fool Live that aired on Oct. 23, "The Wrap" host Jason Hall, Fool analyst Jason Moser, and contributor Danny Vena discuss the company's recent earnings results in the context of its recent struggles and what it could mean for the future.

Jason Hall: Danny Vena, you're going to drop a little bit of Mattel, ticker is MAT, knowledge on us. Stock was up like 11% today. This is a company that's there's been some stumbles over the past couple of years, and this is a big bounce-back quarter, Danny. Maybe lay the background of how we got to where we are and how things are starting to finally turn around for Mattel.

Danny Vena: Absolutely. If you step back about 20 years ago, actually even more like 10 years ago, Mattel was having some difficulties. Barbies weren't selling as well as they used to their flagship product, and they decided to come out with some princess-themed Barbies. That competed directly with Disney's Princess brand, which Mattel was the licensee of.

Hall: Not a good idea when the big dog with intellectual property is one of your best customers.

Vena: Probably one of the most ill-advised moves in business history, or at least somewhere near the top of the list, that kind of ticked Disney off. At the end of 2014, Disney announced that it was giving those extremely lucrative Disney rights to Hasbro. At that point, I think Mattel was gaining somewhere in the neighborhood of like $500 million a year from licensing Disney's Princess and Frozen products. So it was a big blow to them, and since then, things really have just gone downhill from there. They've been on the ropes for several years now. They've had a revolving door of CEOs. I think they are on their third CEO in five years. You go back, in addition to the slumping Barbie sales, you had the fall of Toys "R" Us, I don't know if you remember last year.

Hall: Which couldn't have happened in opportune time, because Toys "R" Us was a pretty decent business buried by debt. But in the background, there was this massive transition to e-commerce, and that really eroded brand power, especially for somebody like Mattel.

Vena: Not only that, but then if you look at, what, Mattel was late to the e-commerce party. So they hadn't developed those e-commerce sales channels, and then the issue with the CEOs. Does anybody actually remember that we had a trade war with China last year?

Moser: Did that ever technically end, actually? I feel like it's still going on; it's just on the back burner for now, right?

Hall: Something else seems to have happened that might caught its attention.

Vena: It might even be on another stove, not even on the back burner.

Hall: Fair enough.

Vena: So that kind of sets the stage. Mattel has been a company in transition for a number of years, suspended their dividend, came out with a plan to turn the business around.

Hall: It's looking like that's starting to work, right, Danny?

Vena: That's what it looks like now. We're going talk a little bit about the results. For the third quarter, Mattel came out and said that net sales of $1.6 billion were up about 10% year over year. Now, just to put that in context, analysts were expecting $1.46 billion and they came in at $1.63 billion. So a huge beat on the top line. That was driven by their dolls category. Sales were up 22%; Barbie sales were up 29%. Some of their other segments, action figures, building sets, and games were up 14%. This was a big beat, and it was a much-needed win for them. Operating income was up 156% year over year, and net income was up 348%. Now, it's important to say that Mattel was having a hard time last year. So this is off a very low base. That said, this is still an incredible performance for a company that was just literally on the ropes not too long ago. So I think that Mattel shareholders get to breathe a sigh of relief for yet another quarter.

Hall: This is a combination of things. This is both low expectations, but also pretty good results. It wasn't just that the expectation was low, but the company delivered something that was solid.

Vena: This was definitely a solid performance. One of the things that I picked out that I really liked of it, for a company that had almost no e-commerce presence just several years ago, their e-commerce growth this quarter was 50% year over year. Now, we have seen some companies that have put up triple digit e-commerce growth, but that's in a different context. The fact that Mattel was starting from so low a base of e-commerce sales, they're doing a really good job. So I'm pleased to see it as a Mattel shareholder. I bought a few years ago on the idea that it was going to be a quick turnaround -- has not been that quick. They've hit every possible roadblock they could, but the company is making it work. I think this is actually another example for why, if you're going to buy a stock, hold it for at least three to five years. I'm coming up on the four-year mark now, and I might actually get to the point where Mattel is a winner and a market-beater for me.

Hall: Thank you, sir. Good stuff. It's kind of fun sometimes to look back at these brands that might be just easy to miss because this isn't Unity, or Snowflake, or one of these hot, hypergrowth companies that we get so excited about. They do something really important and it's a durable business. It's not going to get pushed to the side by e-commerce. Once they figure out e-commerce, they can shine. So I'm interested to keep following along. Thanks for updating us on that, Danny.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.