LA JOLLA, CALIF. -- . Dick Shawn, 57, a comic actor who appeared in the Mel Brooks comedy "The Producers," died April 17 at a hospital here after an apparent heart attack. He was stricken while performing at the University of California at San Diego.

His film credits included "It's a Mad, Mad, Mad, Mad World" in 1963 and "The Producers" in 1968, in which he played a hippie actor with the initials LSD who portrays Adolf Hitler in a Broadway musical.

In "The Producers," characters portrayed by Zero Mostel and Gene Wilder devise a get-rich scheme that calls for them to put on a flop musical. They decide that the perfect vehicle is a musical comedy involving the life and times of Hitler. Mr. Shawn's character's performance as a hip Hitler makes the play a hit.

"The Producers" was director Brooks' first feature, and won him an Oscar for best screenplay.

Mr. Shawn played leading roles in "It's a Mad, Mad, Mad, Mad World," "Way, Way Out" with Jerry Lewis and Blake Edwards' "What Did You Do in the War, Daddy?" with James Coburn. He also had appeared in "Love at First Bite."

On Broadway, his plays included "The Egg" and "A Funny Thing Happened on the Way to the Forum." He also appeared on several television series, including "St. Elsewhere."

Mr. Shawn was born Richard Schulefand in Buffalo and grew up in Lackawanna, N.Y. He began his career in comedy near the end of World War II while assigned to an Army tank repair unit. After the war, he studied at the University of Miami. Success in a college talent show won him a trip to New York and an appearance on the "Arthur Godfrey Talent Scouts" show. Although he didn't win, he decided to stay in New York.

Director Harry Wagstaff Gribble, who had seen him on Godfrey's show, gave him his first professional job, a part in the play "For Heaven's Sake, Mother!" with Nancy Carroll and Molly Picon.

Mr. Shawn's vaudeville performances made him a star. The versatile singer-dancer-actor-comedian appeared on "The Ed Sullivan Show" and made televised appearances with Steve Allen, Eddie Fisher and Dinah Shore. By 1955, he had played New York's Palace with Betty Hutton for $1,500 a week.

"Marlene Dietrich saw me and took me to Las Vegas with her show," Mr. Shawn said. "After that I appeared with Edith Piaf, Zsa Zsa Gabor, Betty Grable, Rhonda Fleming, Arlene Dahl." With his strong physique, handsome face and brushlike hair, he made a strong appearance on nightclub floors and in movies. He had appeared in a number of benefits, including "Comic Relief" last year for the homeless.