EDMONTON, Alberta -- In an attempt to shake the Flyers out of their recent offensive funk -- they had a combined three goals over their previous two games in Western Canada -- coach Alain Vigneault scrambled all four lines Wednesday in Edmonton.

It didn’t produce a victory, but it did generate a lot more offensive-zone time and a slew of great scoring chances, but the Flyers could not finish many of them in a 6-3 loss to the Edmonton Oilers at Rogers Place.

Connor McDavid equaled a career high with five points (goal, four assists) to highlight the victory.

The Flyers, who faced a 6-1 deficit until they scored two late garbage-time goals, outshot the Oilers, 52-22, in the bizarre game.

“Sometimes, the game looks unfair,” Vigneault said, “but I’m a firm believer if you do things the right way, things will even out. I thought for the most part, we played a real solid game. The difference was their third goal. Their big guys found a way to put the puck in the back of the net. We had some great looks; the right guys had the looks, and their goaltender (Mikko Koskinen) was the difference-maker in the game. He played exceptionally well.”

Koskinen made 49 stops, including nine on James van Riemsdyk and eight on Sean Couturier.

One minute the Flyers faced a 2-1 second-period deficit in a game they were dominating in shots, scoring opportunities and possession. A few minutes later they were trailing, 5-1, en route to a lopsided loss. They head home from a winless (0-2-1) Western Canada trip that leaves them with an uninspiring 2-2-1 record.

The Oilers (6-1) ruined Carter Hart’s homecoming, chasing him with 5 minutes, 28 seconds left in the second period and the Flyers facing a 4-1 deficit -- even though Philadelphia had 24-14 shots advantage at the time.

“Coming home for the first time, for sure there’s nerves, but at the end of the day, you still have a job to do and you have to stop pucks,” Hart said. “Tonight, I didn’t stop pucks and didn’t do my job. I didn’t give my team a chance to win tonight."

Added Hart: “I thought we came out really hard. We put up 50 shots, so we came out hard for the whole game, but I didn’t do my job and it cost us.”

McDavid (a goal only he scores) and Ryan Nugent-Hopkins (power play) scored less than two minutes apart to make it 4-1 and chase a shaky Hart, who grew up in nearby Sherwood Par and had dozens of friends and family members in the crowd. He was playing his first NHL game in Edmonton.

Brian Elliott replaced Hart and, shortly after he made a remarkable spin-around save while

Edmonton was on a power play, Leon Draisatl (two goals) scored on scramble in front with 3:34 left in the second. It was 5-1 and the fans were howling.

Earlier in the second, McDavid made it 3-1 as he sped past defenseman Justin Braun and got around him with a head-shaking move -– countless others have felt the defenseman’s pain against the speedy superstar -- and beat Hart from in close. Hart made an ill-advised poke-check that didn’t work.

“That was just a stupid read on my part,” Hart said. “... I was over-aggressive and should have just let it come to me.”

The Flyers allowed the game’s first goal 95 seconds into Tuesday’s 3-1 loss in Calgary. On Wednesday, it took the Oilers just 73 seconds to score first.

After a failed clearing attempt by Oskar Lindblom, Draisaitl ripped a right-circle shot off the left post and into the net to give Edmonton the early lead.

The Flyers’ new-look power-play tied it on Jake Voracek’s goal on a rebound off Claude Giroux’s shot, knotting the score at 1-1 with 12:24 left in the first.

A little over seven minutes later, Edmonton regained the lead … seconds after the Flyers looked like they would snap the 1-1 tie.

Kevin Hayes was stopped by Koskinen from point-blank range, and the Oilers controlled the long rebound and raced down the ice. Defenseman Ethan Bear, the trailer on the play, was left all alone and he beat Hart from the left-circle, putting the Oilers ahead, 2-1.

“I thought we actually played a pretty good team game,” Hayes said. 'We didn’t get any bounces and they scored quick. I missed a point-blank shot there and then they came down and scored. And then we have three Grade A chances, and they flip it out (to McDavid) and they score."

Because the Flyers have put a premium on defense, “a couple guys may be slow in taking off [to the offensive end],” Vigneault explained before the game. “They’re making sure maybe about the emphasis we’re putting on defense. You have to find the right balance in both, so I’ve changed the lines a little.”

Vigneault reunited Giroux, Couturier and Konecny on the top unit, and had Hayes centering Lindblom and van Riemsdyk on the second line. The other lines: Scott Laughton centering Michael Raffl and Voracek, and Connor Bunnman centering Carsen Twarynski and Tyler Pitlick. (In the second period, Voracek and van Riemsdyk traded places, among other line changes.)

The new Flyers coach also changed the power play. Konecny and Couturier went from the second to first unit, while van Riemsdyk and Hayes dropped to the second unit.

None of it mattered because Koskinen stood tall when the game hung in the balance in the latter stages of the second period and Edmonton holding a 2-1 lead.

“If we play like tonight, we’ll win a lot of games,” said Couturier whose team, playing on back-to-back nights, had 85 shot attempts to the Oilers’ 37.

Breakaways

The Flyers set a franchise record for a third period with 25 shots. ... In the third period, former Flyer Brandon Manning, who had been a healthy scratch in the previous six games, and Lindblom exchanged goals. Voracek’s second goal of the game then made it 6-3 with 2:18 left. He scored on a rare six-on-three as Elliott was pulled for an extra attacker. .... The Flyers face visiting Dallas on Saturday.