Look out, Aladdin. This time when you rub your magic lamp, Robin Williams pops out of the spout, in Disney's manic new animated version of the classic fairy tale.
And Mr. Williams' quick-change-artist of a genie plunges the film "Aladdin," which opens at most theaters Wednesday, into more whacked-out cartoon comedy shtick than the ancient Arabs and Persians ever bargained for.
"We wrote the script with Robin Williams in mind," said producer-director John Musker, who along with Ron Clements, Ted Elliott and Terry Rossio expanded the screenplay from an original treatment by the late Howard Ashman. (Ashman, who won a 1991 Academy Award for best song for "Beauty and Beast," also co-wrote three of "Aladdin's" songs with his longtime partner, Alan Menken).
"And since the casting really affects the way a character looks, the drawing of the genie was obviously tailored to Robin Williams' performance and all his marvelous verbal pyrotechnics."
In "Aladdin," Mr. Williams blitzes through a dazzling profusion of vocal changes: gruff, kind-hearted genie through a Las Vegas-style stand-up routine to Jack Nicholson, Ed Sullivan, Arsenio Hall and Pinocchio.
Along the way his plump, doughy genie body mutates from wispy smoke to evilly arched Nicholsonian eyebrows, Pinocchio's really big nose and Sullivan's really big chin. Not to mention a leaning tower of implacable rage resembling a toasty-black "Ghostbusters" marshmallow man.
So the question is, which came first: Robin Williams or "Aladdin"?
The answer: both.
"When we recorded Robin we just let him loose and encouraged him to improvise," Mr. Musker said. "He was so hilarious we were rolling on the floor in the control room. Then later on we'd have to try and boil it all down to his funniest stuff. Which was hard, because Robin would just get to the point of a character, and then he'd just zing around to something -- and someone -- else."
"We took the lines that Robin gave us and we basically just ran with them," said Joe Haidar, one of the animators who helped to draw Mr. Williams' takes on Nicholson and Arsenio.
"We only had time to make a quick visual statement. With Williams doing Nicholson, I emphasized the eyebrows, the sunglasses, the big smile. I had to study "The Shining" to do that."
Among the 70 or so character impersonations in "Aladdin" are a wonderfully twittish take on conservative political commentator William F. Buckley Jr. and a snarling "Taxi Driver"-ish Robert De Niro. But others, such as Mr. Williams' spins on John Wayne or Walter Cronkite, ended up as outtakes.
"Robin did a wonderful Cronkite routine in the place where Aladdin is contemplating freeing the genie," Mr. Musker said. "And he did George Bush when we asked him for a line about not letting go of the past. Maybe we anticipated that Bush would be out of office by now, because we didn't use it."
If much of genie-Williams' blitzkrieg talk-show delivery and visual fireworks seem far too fast and complex for kids, the flat, simple drawing and easy dialogue of Aladdin and his lovely Princess Jasmine seem an obvious, child-pleasing counterpoint.
"We've mixed adult and kid sensibilities here," Mr. Musker said. "Clearly we see that adults and kids come away from the film with different impressions. The kids go for the simpler dialogue and animation of Aladdin and Jasmine, and the monkey Abu and the magic carpet."