When Cobie Smulders moved to Manhattan three years ago, she had a darn good reason . . . and a goal. Her reason: After shooting the final season of “How I Met Your Mother,” she was finally able to live full-time in the same ZIP code as her husband, Taran Killam (then a star of “Saturday Night Live”). Her goal: To make it to Broadway.

Now she can cross that off her bucket list, having made her Broadway debut last month in Noël Coward’s “Present Laughter,” a sharp, sophisticated comedy starring Kevin Kline as an aging actor who juggles the ladies, from his ex (the estimable Kate Burton) to his buddy’s wife (Smulders). Lucky Smulders — just watching Kline check his reflection in a mirror is a master class in comic timing. The critically acclaimed show runs at the St. James Theatre through July 2.

After that, Smulders, Killam and their two daughters will move back to Los Angeles, traveling by RV. A Vancouver native, Smulders, 35, has appeared in the Marvel Comics “Avengers” film franchise and will be seen alongside Killam in “Why We’re Killing Gunther.”

“Present Laughter” seems the perfect way for you to move from screen to stage — it’s an ensemble piece, just like “How I Met Your Mother.”

I started out doing theater in high school. I gravitated to TV and film, but I’ve always wanted to get onstage. At the start, it was such a luxury to have a month of rehearsals — a chance to tweak things, throw things out, revamp, with amazing performers. In film, you’re lucky if you meet everybody before you’re in front of the camera with them.

advertisement | advertise on newsday

And you survived the previews process?

That was the most taxing, because I have small children. Being at the theater from noon to midnight everyday is not very conducive to family life. But it was temporary. Now the challenge is keeping it alive for the audience every night. That’s why I wanted to do theater — going through this process makes you a better actor. And I want to become better at what I do.

Working with Kevin Kline must be a nice perk.

It’s a spoil of riches. [She laughs.] Kevin . . . [She pauses.] Not only is it amazing to be onstage with him every night, but it’s always different. He’s so talented. And so much fun to play with. Just like the rest of the cast. It’s this family unit, where everyone’s supportive. And doing Noël Coward — these eloquent speeches in a fun British accent — every part of the process is just delicious.

How tough was it to perfect the accent?

Having small children helps. Reading nighttime stories over and over and over — I mean, I rock that out each night if I’m home, with a full-on British accent. So I know every day I’m practicing the accent for at least an hour. And luckily — for me — my mother’s British . . . so it’s always been in my world, that type of voice . . .

That’s handy, to be able to ask Mom, “Hey, does this sound OK?”

advertisement | advertise on newsday

You know, actually . . . she’s lived in Canada for almost 40 years . . . so I don’t really trust her ear. But she came to the show, and was like, [She adopts a thick British accent] “Cobie, for the first 10 minutes I didn’t even know it was you!” [She chuckles]. I took that as a compliment.

Before you go, one other thing — why are we killing Gunther, exactly?

Everyone has their own reasons.

advertisement | advertise on newsday

It’s a great title — “Why We’re Killing Gunther.”

It’s a mockumentary about a group of contract killers who all have a vendetta against this one man — the most notorious hit man of all time. Taran wrote, directed and stars in it. And I was lucky enough to be by his side, playing his ex-girlfriend. It’s really funny and unique. I think people will be excited by it.

And are you really heading back to L.A. . . . in an RV?

Oh, yeah. We’re doing it. I’m excited. When you’re young, road trips can be boring and monotonous but there’s something that’s so . . . I don’t know . . . familiar? Nostalgic? I don’t remember having a blast sitting in the back seat of my parents’ car. [She laughs.] I’m sure I was wishing I had a Game Boy. But for me . . . more than ever now . . . I’m realizing I live in a bubble in the United States of America. I like my bubble. It’s safe and has like-minded people . . . but I’d like to see what the rest of the country is like.

I guess you two will wind up blissful by the end — or ready to kill each other.

I know. It’s a bit of a gamble. But that’s the beauty of it. It’ll be an adventure, no matter what.