You have to thank your lucky stars for a movie like this–not because “Dear Frankie” is terribly good (it’s not), but because it could have been so much worse. Novice director Shona Auerbach has taken a script (by Andrea Gibb) that might have been executed in the most mawkish, maudlin fashion and transformed it into a reasonably digestible slice of domestic drama–one that’s good-hearted, but that doesn’t give you excessive heartburn. The flinty, realistic Scottish setting may be partially responsible, but even here sappiness might have taken over. That it doesn’t is a tribute to the restraint of both Auerbach and her cast. The result is a film that’s contrived but nonetheless affecting.

Frankie (Jake McElhone) is a hearing-impaired nine-year old living with his mother Lizzie (Emily Mortimer) and grandmother Nell (Mary Riggans) in Glasgow. They move over and over, because unknown to the boy his mother left his abusive father years before and her in-laws keep trying to track them down. In order to keep the truth about his dad from her son, however, Lizzie has manufactured an elaborate deception. She tells the boy that his father is a seaman sailing in distant climes, and with the help of postal clerks regularly sends him letters ostensibly from his dad but actually written by her. As a result the boy’s become fascinated with following the itinerary of his father’s ship around the globe. A crisis arises when the vessel’s schedule brings it to Glasgow itself. Lizzie’s response–suggested to her by her shopkeeper friend Marie (Sharon Small)–is to hire a fellow (Gerard Butler) to play the absentee seagoing dad and spend some quality time with his supposed son over his weekend “shore leave.” Of course the man proves less mercenary than he at first appears, bonding quickly with the boy and showing real sympathy and concern for Lizzie as well. A last-act intervention involving Frankie’s real father (Cal Macaninch) complicates the emotional landscape and poses a dilemma for Lizzie.

One can easily imagine how this scenario could have descended into sheer bathos. That it avoids such a fate is a credit to the sensitivity of Gibb’s script, Auerbach’s direction and the work of their talented actors. Mortimer anchors the film with a touching performance as a dedicated mother who will go to almost any length to shelter her son, and Riggans supports her beautifully as a strong, opinionated woman who is equally protective of her child. Butler, whose more recent turn in “The Phantom of the Opera” was a severe disappointment, is much more successful here, leavening a seemingly stern exterior with a well-controlled sense of compassion; and Small adds a welcome dose of spice as the vibrant Marie. Most important of all, young McElhone makes Frankie charming but at the same time grounded in reality; there’s a bit of knowing edginess to him, and he’s not your typical cute movie kid. Sean Brown adds to the strength of the youthful presence as one of the boy’s classmates, a kid with a nasty side, and the children in supporting roles are good, too. The cinematography of Auerbach, who acts as her own cameraman, catches the gently grim Glasgow surroundings expertly, and Alex Heffes’ background score is supportive without being intrusive.

The welcome restraint exhibited by everyone in front of and behind the lens helps “Dear Frankie” avoid sentimentality while expressing honest emotion. The result is a cinematic missive that you’ll probably feel deserves a warm reply.