ROBIN WILLIAMS: (As Adrian Cronauer) Hey this is not a test. This is rock 'n roll.

MONDELLO: His radio DJ in "Good Morning, Vietnam," for instance, introduced audiences in a three and a half minute monologue where you could see Williams doing every sound effect himself.

(SOUNDBITE OF FILM, "GOOD MORNING, VIETNAM")

WILLIAMS: (As Adrian Cronauer) We've got it on the wrong speed, for those of you who are recovering from a hangover that's going to sound just right. Let's put it right back down again. Let's try it a little faster, see if that picks it up a little bit. Let's get up on - 7, 18 minutes and, oh, my gosh those pilots. I really like that music. I really like that music. I really like that music. Oh, it's still a bad song. Hey, wait a minute, let's try something. Let's play this backwards and see if it gets any better.

MONDELLO: Some of this figure, you figure, has to have been written but it sounds like stream of consciousness bubbling up spontaneously. It almost needed to be animated. A notion that the folks at Disney, who produced "Good Morning, Vietnam," leaped to take advantage of, creating a character specifically for Williams in "Aladdin" - the bright blue Genie whose vocals were so antic the Disney animators could barely keep up.

(SOUNDBITE OF FILM, "ALADDIN")

WILLIAMS: (As Genie) And I'll say Mr. Aladdin sir, what will your pleasure be? Let me take your order, jot it down - you ain't never had a friend like me.

MONDELLO: There was method, you had to figure, in the barely controlled madness Disney was buying into with Williams. Any parent knows a four-year-old is going to want to see a film, pretty much any film, over and over with Williams riffing so fast mom and dad could watch repeatedly, too, and still be catching new jokes on the 15th go-round. It's a strategy animated films now employ all the time - Eddie Murphy in "Shrek," Patton Oswalt in "Ratatouille," Ellen DeGeneres in "Finding Nemo" - all following in Williams' footsteps.

MONDELLO: That Williams' playfulness could be put to use in more serious roles occurred quickly to moviemakers, as it often does with clowns who have a wistfulness about them. Yes, he was misused at times when things were allowed to get sickly sweet. But he could be a fine character actor - a fact that won him Oscar nominations when he played an inspiring English teacher in "Dead Poets Society" and a psychologist in "Good Will Hunting" who brings a defensive, compulsively bookish Matt Damon out of his shell by revealing vulnerability in himself.

(SOUNDBITE OF FILM, "GOOD WILL HUNTING")

WILLIAMS: (As Sean Maguire) I asked you about love - you could probably quote me a sonnet. But you've never looked at woman who'd been totally vulnerable. Known someone that could level you with their eyes. Feeling like God put an angel on earth just for you.

MONDELLO: There was often a needy quality to his characters as well as charm and a compulsion to entertain. There were darker undercurrents, too. Robin Williams spoke openly, even made stand up comedy, of his struggles with alcohol, cocaine and depression. Those struggles now ended. He is, as his Genie character in "Aladdin" would have it, finally free. I'm Bob Mondello. Transcript provided by NPR, Copyright NPR.