In “Bullets Over Broadway,” the musical adaptation of Woody Allen's 1994 film of the same name, Zach Braff sings the Tin Pan Alley classic “I'm Sitting on Top of the World.”

It is a refrain he can really get into.

“I'm blessed. I'm having a really good year,” says Braff, who is currently starring in “Bullets” on the Broadway stage in New York.

“Every creative person has their ups and downs, but this has been a real lucky year for me. I'm working with my heroes on Broadway and have had a phenomenal response to this film. I can't wait to share it with people.”

The film he's referring to is “Wish I Was Here,” which he stars in and directs. Opening today, it comes a decade after his hit directorial debut, “Garden State.”

In between, the 39-year-old Braff — who starred on NBC's “Scrubs” for nine years — wasn't so lucky getting a second feature made. For whatever reasons (mostly financing), the stars just didn't align.

To get “Wish I Was Here” made, Braff turned to the public, partially funding the film through the website Kickstarter. He set the target at $2 million, but quickly raised $3.1 million, netting about $2.7 million after “fulfillment responsibilities to contributors.”

The rest of the film's $5.5 million budget came out of his own pocket and revenue from preselling film distribution rights overseas, Braff says.

“Garden State” examined the unease that the then 20-somethings were feeling during the post-9/11 period. In “Wish I Was Here,” the New Jersey native casts his eye toward the weighty issues of religion and spirituality in the face of death and pursuing your dream at the expense of others.

What the two films have in common is that while being serious, they are also quirky and amusing at times.

“I like to have my heart ache. I like to have my eyes well, but I don't want to be too maudlin. I like to laugh,” says Braff, who co-wrote the script with his brother, Adam, a novelist.

In “Wish I Was Here,” Braff plays Aidan, a struggling actor in Los Angeles. His real job — besides going on auditions — is to take care of his two children while his wife (Kate Hudson) works at a numbing office job.

Aidan's dad, Gabe (Mandy Patinkin of “Homeland”), pays for the children's education, and being religious, has chosen a Jewish school for them despite his son's agnostic views. Then one day Gabe announces he has a fast-spreading cancer and needs the money for an experimental treatment.

That creates a dilemma over the children's schooling, since Aidan doesn't earn any money, but still wants to pursue acting.

“Everybody has things they want to accomplish before they die,” says Braff. “But how long do you hold on to that dream?”

Like “Garden State,” the new film comes from aspects of Braff's life. In both, he plays a struggling actor.

“It's something I could tap into with the most honesty,” he says.

Braff is a bachelor but describes his brother, who has children, as a “funny out-of-the-box kind of dad who can talk to his kids like his peers,” which is a lot like Aidan.

Woven into “Wish I Was Here” are matters of belief as it becomes clear that Gabe has little time left.

Braff and his brother were raised in “a very Jewish home,” he says. “Neither of us took to it. So we really wanted to do something about questioning your spirituality, especially when you're raising kids and you don't have the comfort of an organized religion to at least help you answer the tough questions.”

The brothers, however, didn't want the film to feel “didactic or preachy. The characters are more confused than anybody. We're not criticizing anybody at all for whom organized religion works.”

On the other hand, Braff continues, “It's insane that we are on this tiny rock floating in the middle of infinity. I don't know how to make sense of that. I just felt no one was making films about it.”

Because of the Kickstarter funds and his own money, Braff was able to do something with “Wish I Was Here” fewer filmmakers are doing — shoot in Los Angeles. He says because of limited tax breaks, the city is hemorrhaging work from the movie industry to other places.

“People were shocked when I decided to film in L.A. when I didn't get a tax break, but because L.A. was a character in my film, how could I not have it in the movie?”

Plus, he was able to use “the amazing talented crews that are in L.A.” who were willing to work on a smaller movie because they could go home at night.

Braff was also happy to call on Hollywood's talented pool of actors.

“After nine years on ‘Scrubs,' I know some of the funniest and greatest people who would come in and do a scene or two in the movie. I couldn't have access to those people in another state.”

One of those was Emmy-winning “The Big Bang Theory” star Jim Parsons, who plays another struggling actor on an audition.

“Jim did it as a favor to me because one of his first breaks was in ‘Garden State' and we're friends.

“But people like Jim can't come to Atlanta to do a day shoot on a movie.”

Kickstarter backers got to see some of this as it was going on. As part of his “fulfillment responsibilities,” Braff made “cool little” short videos for them during the making of the film.

“We'd see comments like, ‘I love movies but don't really know anything about making movies,' ” he says.

“So we would show them what a gaffer does or take them on a location scout.”

Music was a big part of “Garden State,” with the album becoming a best-seller. The songs were handpicked by Braff, who won a Grammy Award for best compilation soundtrack.

“Wish I Was Here” backers also get a record.

“We were really lucky because I actually showed the film to three of my favorite artists, and they wrote original music for it,” says Braff.

The Shins and Bon Iver both wrote and performed songs in the movie, while Coldplay wrote the title song, which Cat Power sings.

Braff was singing, too, about the success of “Bullets Over Broadway,” which he expects to do until the end of the year. It's his first Broadway play and first musical, and it's at the famed St. James Theatre — seating some 1,700 — where “Oklahoma!” “The King and I” and “Hello, Dolly!” debuted.

“It's such a thrill to make people laugh,” says Braff.

He plays a writer who is getting his first play produced on Broadway after making a devil's bargain with a gangster.

“My very first movie role was playing Woody (Allen)'s son in ‘Manhattan Murder Mystery,' ” notes the actor. “So I'm glad to say he hired me again.”

Going back to television isn't out of the question for Braff, but it would probably be a project on cable.

“There's a lot more creative freedom there than on the networks,” he said.

Braff also would like to direct another movie, but he knows that won't be easy.

“Financing is insane and close to impossible. It's amazing anything gets made.”