In the moderately compelling inspirational sports movie, "The Flying Scotsman," Jonny Lee Miller plays Graeme Obree, a maverick competitive bicyclist from Glasgow who designed and built his own bike out of spare parts, and won several championships with the thing.

Unlike most heroes of this genre, Obree also had severe mental problems. His drive for bicycling excellence was abnormally obsessive, and he was subject to depression so dark that, as the movie opens, we see him walking into the woods to commit suicide.

From this grim beginning, the script flashes back to pick up Obree's story in the early '90s, when - already something of a competitive has-been and supporting himself as a messenger boy - he gets the idea of building a radically different kind of racing bicycle.

The story then flashes back yet again to dramatize the seed of his obsession with speed: as a youngster, he's mercilessly bullied by the other boys until his policeman father gives him a bicycle on which he can escape their clutches.

Most of the movie, however, deals with Obree's life just before and after his suicide attempt, as he's breaking records and dazzling the cycling world with his makeshift machine - only to have his titles stripped by officials who view his innovations as a threat to the sport.

As written and directed by first-time filmmaker Douglas Mackinnon, the film's exposition is so sketchy and its narrative so choppy that it's often a struggle to stay oriented.

Obree's battle with the stuffed shirts of the World Federation of Cycling also is very clumsily portrayed. Indeed, its German president (Steven Berkoff) is such a clichéd Teutonic meanie that "The Flying Scotsman" often feels like a World War II Hollywood propaganda film.

But Obree's psychology is fascinating and, even though the competitive scenes mostly involve him racing against himself in a spectator-free indoor track, the movie manages to give its audience a suitable adrenaline rush here and there.

The cast is also good. Miller makes a fine tortured hero; Billy Boyd (Pippin of the "Lord of the Rings" movies) is all spunky Scottish charm as his upbeat manager; and Brian Cox all but steals the movie as Obree's sweet-spirited mentor and spiritual adviser. *

Produced by Peter Broughan, Sara Giles, Damita Nikapota, directed by Douglas Mackinnon, written by John Brown, Declan Hughes, music by Martin Phipps.