Sam Reinhart tied it 2-2 at 10:56 with a one-timer on a power play off a beautiful passing play with Tkachuk and Aleksander Barkov.
Ruzicka restored Calgary to a 3-2 lead at 12:58, but Eetu Luostarinen tied it 3-3 at 1:12 of the third.
Blake Coleman put the Flames back in front 4-3 at 6:56 of the third. Huberdeau started the play when he forced a turnover in Florida's zone with a body check on Aaron Ekblad.
"This was sort of a tight, even game where I did not think one team had a long stretch of dominance," Panthers coach Paul Maurice said. "It was a pretty tentative start in the first, but we got going in the second. It is one of those games that, 20 years ago, would have ended in a tie, and you would have thought that was right."
NOTES: Huberdeau and Barkov, who played together in Florida for nine seasons, passed each other the puck at the end of warmups. "The warmups were a little emotional," Barkov said. "It was hard to hear those two guys weren't going to be here anymore in the summer. Now you see them on the other side, and you realize they're not here. I hope they are happy there, and we turned the page a long time ago. I am happy with this team, happy with everyone here, but I am happy for them." … Weegar played 16:25. … Lindholm had two assists.