TORONTO -- The sudden parents in "The Odd Life of Timothy Green" make one mistake after another as they bumble through attempts to care for a young boy who mysteriously emerges from their garden.

It's a Disney film that aims its lessons squarely at the adults instead of the kids and writer-director Peter Hedges admits to drawing on his own failings as a father for inspiration.

"Selfishly, I'm a parent and I felt the window closing on my time as a parent," Hedges says during recent stop in Toronto to promote the film.

"My kids were young teenagers when I started working on this project and I felt like it was an opportunity to maybe make peace with some of the crimes I've committed as a parent but also maybe get some new perspectives on some approaches I've been taking and make some changes."

The magical origins of this instant family are pure fantasy but the awkward adult missteps are very real, notes Hedges, who delicately explored the adult-kid dynamic with an Oscar-nominated screenplay for "About A Boy."

In "The Odd Life of Timothy Green," Jennifer Garner and Joel Edgerton play wannabe parents Cindy and Jim Green.

Despondent after being told they can't conceive a child, they spend a drunken evening writing down the qualities their wished-for kid would have and burying the list in the yard.

Following a sudden rainstorm hours later, a muddy boy appears in their home claiming he "came from the garden" and nonchalantly calling them mom and dad.

He brushes aside questions about the strange green leaves sprouting from his legs and Jim and Cindy can't resist imposing their idealized expectations on the wide-eyed child. It's too late when they realize he's keeping a painful secret.

Hedges calls that "the unknowable-ness of children," noting it's impossible to know or understand everything they go through, even if they are your own offspring.

Edgerton says he was intrigued by that notion especially, slipping into an account of a decades-old trauma he revealed to his parents only recently -- a particularly strict babysitter they left him and his brother with for five weeks.

"She wasn't a very nice lady," recounts Edgerton, estimating he was about eight or nine at the time.

"(She was) very strict and beat us with this thing called a 'mattenklopper,' which is Dutch for a mat hitter.... But she was from the Second World War era, had been widowed and was very strict. Her house was all tweed and the curtains were all drawn and (my brother and I were) like, 'Why did you leave us with that woman?' And my mom was mortified because we'd never shared it with her before."

For his part, Hedges admits to committing many "parenting crimes."

"He's a repeat offender," Edgerton helpfully quips.

"I'm a repeat offender," Hedges agrees, pointing to one big blunder that came to light when his son broke down after losing a sporting event.

"He fell apart and wept and was inconsolable. I realized that the reason he was really weeping, a lot of the reason he was weeping, was because he had disappointed me," says Hedges, calling it "one of the most painful moments" of his life.

"I thought I'd been very cool and was uninvolved and laid back but when I really took the inventory of my behaviour, my actions, I saw that I really wanted him to win."

Hedges says he realized he had a duty to put his son's needs first.

"He didn't come here to fill the holes that are mine. He gets a fresh start and I have to get my stuff worked out in other ways. My job is to create an environment, a safe environment for him to become who he's destined to be and not the person I need him to be," he says.

"That's one of the gifts of getting to make this film, this comedy, this human comedy with heart that hopefully will remind us not only about those kind of themes but also (to) be aware of the preciousness of all that we have."

"The Odd Life of Timothy Green" opens Wednesday.