Steve Ott scored twice and James Neal added the other goal for the Stars, who last won on the road at San Jose on Dec. 11 in a 3-2 shootout.
Philadelphia's Michael Leighton made 27 saves. Leighton has started 10 straight games and has gone 8-0-1.
Hartnell got the Flyers on the board at 6:08 of the first period, scoring on a backhanded flip over Dallas goaltender Marty Turco on a power play.
Neal scored his team-leading 19th goal off a give-and-go with Loui Eriksson 56 seconds into the second period.
The Flyers then struck back with four goals in the next 10:28 to take a 5-1 lead and chase Turco, who stopped only 14 of 19 shots. Alex Auld had eight saves.
Powe started the barrage after taking a pass from behind the net from van Riemsdyk at 2:32. Timonen scored shorthanded at 7:53, Giroux at 12:01 when his shot kicked off the right foot of Dallas defenseman Mark Fistric, and Laperriere 59 seconds later.
Gagne scored after taking a cross-ice pass from Danny Briere at 10:55 of the third period. Ott scored from the crease at 12:47 and again at 16:06 on a rebound.