ALEX McAvoy, who played the cabin boy Sunny Jim in the classic Scottish sitcom, The Vital Spark, in the sixties and seventies, has died at the age of 77. He was the last surviving member of the crew of the little west-coast puffer that gave the series its name.

A familiar face on Scottish stage and screen over many years, McAvoy reached an unlikely international audience of rock fans when he played the villainous teacher in Pink Floyd: The Wall, the 1982 feature film inspired by the band's best-selling album.

It is for the role of Sunny Jim, however, that he will be mostly fondly remembered in his native land.

Neil Munro's comic tales of Para Handy and his inept crew were first adapted for television in 1959, with Duncan Macrae as the skipper; John Grieve as engineer, Dan Macphail; Roddy McMillan as mate, Dougie; and Angus Lennie as Sunny Jim, but it was the second incarnation that became the definitive one.

McMillan took over command of the little vessel that delivered cargo to communities along the west coast of Scotland; Grieve remained as the engineer, forever bemoaning his lot; Walter Carrwas Dougie (though Robert Urquhart played the role in the pilot);

and McAvoy became what must have been one of the oldest cabin boys in the f leet.

He was in his late thirties when he first took it on in a Comedy Playhouse one-off in 1965 and 46 when the third and final series went out in 1974. McAvoy brought to the character a dopey quality that made his lack of career development understandable, though he was not always as daft as he seemed.

McMillan died in 1979, Carr in 1998 and Grieve a couple of years ago.

A third version was broadcast in 1994-95, as The Tales of Para Handy, with Gregor Fisher, fresh from his success as Rab C Nesbitt, as Para Handy, Rikki Fulton as Macphail and Andrew Fairlie as Sunny Jim.

Born in Glasgow in 1928, McAvoy showed early creative flair and worked as a windowdresser. He studied at the Royal Scottish Academy of Music and Drama.

Early in his career he appeared in variety shows, and would later become a regular on the pantomime circuit: he and Johnny Beattie were the Ugly and Uglier Sisters, Kylie and Madonna, in Cinderella at the Ayr Gaiety Theatre in 1990-91.

As well as The Vital Spark, he also appeared in Dad's Army, making a couple of appearances as a brusque Scottish sergeant in 1972-73, and he had a long professional association with Una McLean on television. They were regulars on the Scottish sketch show Between the Lines (1964), along with Tom Conti and Fulton Mackay, were reunited on Did You See Una? (1967) and co-starred in the children's series Bonny!

(1974), in which McLean played Highland postmistress Flora Havers, who writes in secret and finds her stories coming to life. The regular cast also included Walter Carr.

McAvoy was not restricted to light entertainment. As The Vital Spark and The Wall amply demonstrate, he could play both sweet and innocent, and dark and sinister.

Other TV credits included Z Cars (1968 and 1972), Dr Finlay's Casebook (1969), The Standard (1978), Minder (1984) and The Bill (1988).

He worked extensively in theatre, too, and was Jacob in the original London West End production of the musical Joseph and His Amazing Technicolor Dreamcoat in 1973.

Passionately interested in mime, he studied at Jacques Lecoq's school in Paris and served as artistic director of the Scottish Mime Theatre in the early eighties. "Mime is the basic actor's art, " he told The Herald at the time. "It involves total theatre: movement, singing, dancing, playing instruments, clowning. People participate through imagination in the illusion of magic and mystery which connects them in some way to the universal.

"People have stopped going to the theatre because television feeds them the realistic drama which was once the province of the theatre. Participation in magic and mystery implies a spiritual element that people long for."

Film appearances were rare, though he got the chance to play Pink Floyd's Teacher, from the song Another Brick in the Wall - "Hey, Teacher, leave those kids alone" - when Pink Floyd's 1979 album evolved into a full-blown feature film a few years later.

Bob Geldof played Pink, a disillusioned rock superstar, whose story is told in a mixture of the present, flashback, fantasy and animation. The film was dismissed as pretentious by critics, but was a commercial success and remains a favourite with many rock fans.

McAvoy was also memorable as the beadle, hosing clean the eccentric Princess Paloma in Venus Peter (1989). Ian Sellar's lyrical portrait of life in a small, Scottish fishing community was adapted from Christopher Rush's book A Twelvemonth and a Day.

One of his last appearances was in a small role in Peter Capaldi's film Strictly Sinatra (2001), the cast of which included Una McLean.

Alex McAvoy, actor; born March 10, 1928, died June 16, 2005.