When a drugmaker's future is highly dependent on one product, shares are bound to take a hit if that product isn't living up to expectations. Such was the case with Flamel Technologies (NASDAQ:FLML).

On Wednesday, Flamel reported its second-quarter results. Its loss for the quarter was $13.6 million due to higher R&D spending and increased costs associated with its manufacturing of lead drug Coreg CR, which is marketed by GlaxoSmithKline (NYSE:GSK).

Glaxo launched Coreg CR in March. Sales got off to a good start in less than one quarter on the market with $27 million in revenue coming in from the drug. But as we learned last week, the second quarter wasn't such a stellar one for Coreg CR; sales were only $20 million for the quarter as a result of Glaxo focusing resources on defending its Avandia diabetes franchise from concerns over its safety.

Now that some of the pressure is off of Avandia (an FDA advisory committee voted to recommend keeping the drug on the market), GlaxoSmithKline will hopefully be able to focus more resources on its Coreg franchise ahead of the end of exclusivity for the immediate release version of the drug. On its quarterly conference call last week, Glaxo noted that 2,000 additional sales reps would begin detailing Coreg CR as their top product.

Coreg IR will be going off patent next month. Wholesalers usually start reducing their inventory of a drug before it faces generic competition, in order to realize the cost differential between a generic and branded product by loading up on the generic version when it launches. This reduced wholesaler stocking of Coreg IR will provide another big incentive for Glaxo to switch doctors' prescribing habits to CR this quarter ahead of the generic entrants into the market.

What's evident from the last quarter is that Coreg CR just wasn't a marketing priority for Glaxo. This has put a tremendous discount on shares of Flamel, which are down 40% in the past three months.

The Foolish perspective is generally to take a longer-term view and see what the eventual outcome will be, rather than have a knee-jerk reaction to one bad quarter. For investors believing that Glaxo will eventually flex its marketing muscles with Coreg CR and that the drug will be a success, this presents a buying opportunity for shares of Flamel.

Flamel is a Motley Fool Hidden Gems recommendation, and Glaxo is an Income Investor selection.

Fool contributor Brian Lawler does not own shares of any company mentioned in this article. The Fool has a disclosure policy.