Before Robin Williams’ watershed voice turn in “Aladdin,” A-listers turned to toons only when their careers were faltering.

Now, celebs are more than happy to lend their voices and star power, with some raking in millions for a couple of days in sweat pants. For Williams, voice work has turned into a rewarding sideline that approximates the rush of doing stand-up comedy.

“It’s going into a room and having a lot of fun,” he explains. “I start with a script, and I say, ‘Can I go off a little?’ And they say, ‘Yeah, that’s good,’ and then (the animators) start to play with it.”

However, bringing the Genie to life was not a calculated career move. Unaware that the toon biz would prove to be more reliably lucrative than some of his live-action pics, Williams hesitated before committing.

“In those days and throughout much of Disney’s (animation history, the studio has) tried to keep a level playing field in terms of how much they paid the actors, star or not,” says “Aladdin” helmer-writer-producer John Musker. “They have stretched it somewhat, but in those days there was certainly a feeling that Disney is the only game in town.”

Popular on Variety

After several weeks of contract negotiations, Williams began work on “Aladdin” in early 1991. The pic would go on to record $500 million in worldwide B.O., helping to entice stars like Tom Hanks, Eddie Murphy and Ray Romano into the studio.

Williams also stuck with the work. He has voiced three direct-to-video “Aladdin” sequels and an oracle named Dr. Know in Steven Spielberg’s “A.I.: Artificial Intelligence.” His voice will appear this spring in the Fox/Blue Sky Studios CGI toon “Robots,” as well as the Village Roadshow-produced “Happy Feet,” which is set for distribution in the U.S. by Warner Bros. in 2006.

Recalling the days before stars were routinely used on toons, “Aladdin” co-helmer Ron Clements says Williams’ antic comedy style directly led to the creation of the Genie. “We always felt that (Williams) would be a good animation voice,” he says.

Williams’ ability to channel multiple characters during a short stand-up routine matched up well with a genie who was equally mercurial and shape-shifting.

“We wrote the first draft of the script with him in mind, not knowing if he would have any interest at all,” Clements adds.

However, persuading Jeffrey Katzenberg, who headed Disney’s studio efforts at the time, that Williams was right for the role took a little rubbing of the magic lamp. And it wasn’t about the salary.

“We had to sell Jeffrey on the idea a little bit because he had the idea of the genie being this Yul Brynner-like, imposing guy,” says Musker. With a little help from animator in charge of rendering the genie character, Eric Goldberg, Katzenberg agreed to go after Williams.

Goldberg created an animated test short using a Williams monologue from one of his comedy albums, Clements remembers.

“He was talking about schizophrenia and some other things, and Eric just animated the genie doing the monologue and doing all of these transformations.”