But, Tkachuk beat Andersen between the pads on Calgary's second attempt of the shootout to win it.
Down 1-0 through two periods, the Leafs tied it on their fourth power play of the night when John Tavares found Nylander, who had gained position at the lip of Rittich's crease on Noah Hanifin, to tip home his 21st at 8:35.
After Calgary couldn't connect with the man advantage with under eight minutes to go, Rittich robbed Auston Matthews -- the Flames are the only NHL team the center has failed to register a goal against in his career -- on a 2-on-1 to keep things even.
Ryan opened the scoring at 7:34 of the second when he redirected Travis Hamonic's point shot for his ninth.
Toronto came close later in the period when Rittich made a nice save on Nylander's tip of Travis Dermott's drive.
The Calgary goaltender, named to his first NHL All-Star game Tuesday as an injury replacement for Arizona's Darcy Kuemper, was at it again with a pad stop on Kapanen off the rush before stretching to deny Andreas Johnsson on the rebound.
Andersen, who's also going to the all-star game in St. Louis, denied Mikael Backlund with the glove at the other end to keep his team within one through 40 minutes.
Toronto played its second game without star defenseman Morgan Rielly, who joined fellow top-4 blue-liner Jake Muzzin on the shelf this week with a broken foot that's expected to keep him out until at least March 10. ... Tkachuk, who has been going back and forth with Edmonton Oilers forward Zack Kassian since Saturday's game, declined to take things further following Thursday's morning skate. Kassian was suspended two games by the NHL for jumping Tkachuk after the latter rocked him with two crunching body check over the weekend. The NHL saw no issue with either hit, but Kassian called the contact "predatory," adding that he has "a long memory." Tkachuk wouldn't bite when asked about the comments in Toronto. "We're not talking about them right now," Tkachuk said of the Oilers. The teams play again on Jan. 29 -- the first night Kassian is eligible to return to Edmonton.
Flames: at Ottawa on Saturday.
Maple Leafs: host Chicago on Saturday.
More AP NHL: https://apnews.com/NHL and https://twitter.com/AP-Sports