Best-selling writer Ira Levin, whose genre-hopping novels such as the horror classic "Rosemary's Baby" and the Nazi thriller "The Boys from Brazil" provided meaty movie roles for Mia Farrow and Laurence Olivier, has died of a heart attack, his agent said Tuesday. The 78-year-old Levin, who also wrote for television and Broadway during his long career, passed away in his Manhattan apartment on Monday, agent Phyllis Westberg said. Levin, long before authors like Stephen King routinely had their books turned into movies, watched his novels move inexorably to the big screen. Besides "Rosemary's Baby" with Farrow and "The Boys From Brazil" with Olivier, Levin's novels "The Stepford Wives," "Sliver" and "A Kiss Before Dying" all received the Hollywood treatment. His long-running 1978 play "Deathtrap" was also made into a Sidney Lumet-directed film, starring Michael Caine and Christopher Reeve.